AutomoxAutomox

Worklet: Installed vs Approved software list

ncaraway
March 18, 2021 at 3:56 pm UTC

This worklet compares a list of currently installed software to a list of approved software. The worklet uses .txt files to store the arrays since that made it easier to test. The Approved.txt file needs to be uploaded to the worklet, and should just be a list of approved software, one per line. Wildcards can be used in the Approved.txt file.

Evaluation:
Exit 1

Remediation:

powershell5 lines
Get-WmiObject -Class Win32_Product | Sort-Object -Property Name | Select -ExpandProperty Name | Set-Content Installed.txt
$Installed = Get-Content Installed.txt
$Approved = Get-Content Approved.txt
Write-Host "Unapproved Software:"
$Installed |Where {$item=$_; -not ($Approved |Where {$item -like $_}) }

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack