cancel
Showing results for 
Search instead for 
Did you mean: 

Making use of Get-JCSystemApp and create reports using Powershell

JuergenKlaassen
Rising Star I
Rising Star I

Hi Community

A few days back @jworkman wrote about the new PowerShell function 'Get-JCSystemApp' here
I think it's amazing and super valuable in it's first iteration already. 
One question I saw popping up then in the Lounge was how a result could also display the hostname or displayname instead (or along) with the SystemID. 
So I dug into it a little more and came up with a little script as an inspiration:

 

# Specify your Operating System and Software Name
$os = "Windows"
$software = "Slack"
$version = "4.0.0"
$osversion = "10.0.18362"

# Get the list of systems with the specified OS
$systems = Get-JCSystem -os $os #optional: -version $osversion

# Get the list of systems with the specified software installed
$softwareinstalls = Get-JCSystemApp -SystemOS Windows -Name $software #optional: -version $version

# Get the list of systems that have both the specified OS and software installed
$installed = $systems | Where-Object { $_._id -in $softwareinstalls.SystemID }

# Export the list of systems that have both the specified OS and software installed
$installed | ConvertTo-Csv -NoTypeInformation | Out-File -FilePath "./installed-software.csv"

As a result you'll get a CSV with all information gathered via "Get-JCSystem" filtered to the systems having the queried software.

Have fun!
-Juergen

 

 

1 REPLY 1

namlam
Novitiate I

Thank you @JuergenKlaassen for sharing this script.  

Do you have a command to search if the system have 2 apps installed. For example, I'm looking for a command to find any system have both "Skype" & "Slack" installed.  Thanks.