cancel
Showing results for 
Search instead for 
Did you mean: 
Disclaimer
JUMPCLOUD EXPRESSLY DISCLAIMS ALL REPRESENTATIONS, WARRANTIES, CONDITIONS, AND LIABILITIES OF ANY KIND ARISING FROM OR RELATED TO THIRD-PARTY SOFTWARE, SCRIPTS, REPOSITORIES, AND APIS. JUMPCLOUD IS NOT REQUIRED TO SUPPORT ANY SUCH THIRD-PARTY MATERIALS AND ALL RISKS RELATED TO THIRD-PARTY MATERIALS ARE YOUR RESPONSIBILITY. PLEASE ALSO REVIEW THE JUMPCLOUD TOS.

Let's Find the Missing Apps!

shawnsong
Rising Star III
Rising Star III

Hi Folks,

Today, I want to remaster one of my previous works, featuring the recently polished app/software/program focused cmdlet - Get-JCSystemApp (kudos to Joe @jworkman ).

 

The Problem

Now we can easily locate the applications/programs installed on the device(s) thanks to Get-JCSystemApp ‘s comprehensive search/filtering functionality. But, as we all know, with great power comes great curiosity. Now that we can see everything that's there, we start to wonder... what's not? Like, the anti-virus agent, VPN client, or the m365 client app (and this user requested the licence a while back, maybe he/she doesn’t need it for real?).

So usually the most common aspects to look at this are:

  • Some apps/programs are mandatory and they should be in place almost bylaw.
  • Find out the unused/underutilised licences, it might help to trim the IT cost a bit?

 

The Resolution

Cutting to the chase - as usual, TL;DR - head over to my repo for the full script

 


$MissingApp = Read-Host "Input the name of the app" # Given a name of the app you want to find if it's missing on the devices.
$DesiredApp = '*'+$MissingApp+'*'
$systemsMissingApp = @()
$date = (Get-Date).ToString('MMddyyyy')

# Ruling out the mobile devices
$filters = @('os:$ne:iOS','os:$ne:Android','os:$ne:iPadOS')
$allsystems = Get-JcSdkSystem -Filter $filters 

foreach ($system in $allsystems){
    $notMissing = 0

    $allprograms = Get-JCSystemApp -SystemID $system.id -ErrorAction SilentlyContinue

    foreach ($program in $allprograms){
        if ($program.name -like $DesiredApp){
            $notMissing += 1
        }
        
    }
    if ($notMissing -eq 0) {
        $systemsMissingApp += $system
        
    }
}

$reportName = "Missing_" +  $MissingApp + "_" + $date + ".csv"

Write-Host "Here is the glance of the report:"
$systemsMissingApp | select hostname,displayName,os,version,ID  -first 10 | ft
Write-Host "The full report has been exported to $reportname"
$systemsMissingApp | select hostname,displayName,os,version,ID | Export-Csv $reportName

 

It will generate a date-in-the-name csv and display the first 10 device record on the screen like this:

shawnsong_0-1712818185289.png

And that’s it, enjoy the hunting!



0 REPLIES 0