Good day again!
This time I have a smaller and a lot easier script to share.
Ever had clients ask to have their PC's checked for specific software (now and in the future) to make sure no one installs certain software packages?
Well, I had and thus I created this Powershell script (which by the way, requires Powershell 3.0 or higher) that can check this for you.
While it is best to combine this with remote monitoring software, GPO and/or other methods to remote have this run on multiple devices, I am sure there are more uses for it.
So, what does this do?
It simply gets the values under the Installation registry that contain the names of installed software (while not 100% foolproof against some sneakier installation packages, it does mostly retrieve all the installed software) and pastes those in a txt file next to the Powershell script (Can be adjusted).
Now that it has a list of installed software, surely it needs a list to compare it to? Correct. That is where the variable $Bannedsoftwarelocation comes in.
Whether you have a list located on a server share, have it included within a script package, component within remote monitoring software or located anywhere where the script will be able to reach it
The list of blacklisted software simply can be a txt file with the (partial) names of software that is not allowed/should be listed. 1 software name per line!
The script compares the 2 text files and for each software it finds that matches software in the blacklisted software list, it performs an action.
In the script below I have set it to report back the software name that it matched with:
Write-host "Software matching the bannedsoftware list:"
select-string -path ".\InstalledSoftware.txt" -Pattern "$Software" | Select-Object -ExpandProperty Line
You can of course exchange these actions with your own, whether it is creating an event log or anything else that can alert you to this fact.
The blacklisted software list can be filled with whatever you want to have it checking for. This can be intrusive software, alternative software that a client does not want his employee's to use, games etc. etc.
While not the biggest feature, in an age whereby ISO-certifcates and privacy laws become bigger and bigger it can never hurt to have some additional security.
Categories: Powershell, Script, Windows, Blacklist, Software
Requires Powershell 3.0+
Patrick Berger AKA Powershellder.
[ i ] Parallax section below. Click on the section below to upload image. Don't worry if it looks weird in the Weebly editor. It'll look normal on your published site.
To edit or delete your image, press the "toggle" button below. Then, hover over your image until a popup appears with the "edit" and "delete" options. If you don't want a white content section, leave it blank. It will disappear on your live website.