Skip to main content

Worklet: Installed vs Approved software list


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:


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 $_}) }

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings