List MSI paths from Software Installation Policies

Hey,

We have 1000’s of MSI’s assigned through group policy and often need to work with the file paths in PowerShell, here’s a function that returns the file path of the MSI from the Software Installation GPO.

This function will return the MSI path and MST path. It will also return paths of MSI’s that have been deleted from the policy in the past. In my case I don’t want this to happen so if you know a way of filtering out these ‘ghost’ paths, let us know! Also if you want to speed it up you can hard code your domain/domain controller names to avoid discovery.

The function is called like so:

 

Leave a Reply

Your email address will not be published. Required fields are marked *