This project is read-only.

Querying for installed products and patches

Basic product query

To view all products within the default context (all contexts accessible the user):


To view all products that are installed in the machine context (products accessible to all users):

get-msiproductinfo -context machine

All products matching a ProductName pattern

You can always pipe output from these cmdlets to where-object:

get-msiproductinfo | where { $_.ProductName -like "*Visual Studio*" -and $_.ProductVersion -gt "10.0" }

However, to match a ProductName to a pattern you can use the -name parameter:

get-msiproductinfo -name "*Visual Studio*" | where { $_.ProductVersion -gt "10.0" }

All patches applied to a product

You can view all patches installed for all products like so:


But if you would like to see all patches installed for a specific product - even superseded patches:

get-msiproduct "{93489CA8-6656-33A0-A5AC-E0EDEDB17C3E}" | get-msipatchinfo -context All

You can also specify the ProductCode directly to get-msipatchinfo as the first unnamed parameter:

get-msipatchinfo "{93489CA8-6656-33A0-A5AC-E0EDEDB17C3E}" -context All

Last edited Jul 3, 2013 at 12:54 PM by heaths, version 1


No comments yet.