This project is read-only.

Get-MSIProductInfo

Synopsis

Gets product information for registered products.

Syntax

  • Get-MSIProductInfo [[-ProductCode] <String[]>] [-UserSid <String>] [-InstallContext <InstallContext>] [-Everyone]
  • Get-MSIProductInfo -Name <String[]> [-UserSid <String>] [-InstallContext <InstallContext>] [-Everyone]

Detailed Description

Gets product information for all per-machine, user-managed, and user-unmanaged products on the machine.

Parameters

-ProductCode <String[]>

The ProductCode or ProductCodes to retrieve product information.

Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Name <String[]>

The name of a product or products to retrieve. Wildcards are supported.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-UserSid <String>

The security identifier for a user for user-managed and user-unmanaged patches.

Required? false
Position? named
Default value null
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-InstallContext <InstallContext>

The context for registered patches. This can be a combination of "Machine", "UserManaged", or "UserUnmanaged".

Required? false
Position? named
Default value Machine
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Everyone

Whether to retrieve user-managed or user-unmanaged patches for everyone.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-ProductCode <String[]>

The ProductCode or ProductCodes to retrieve product information.

Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

Return Type

  • Microsoft.Deployment.WindowsInstaller.ProductInstallation: Information about the installed or advertised product. To see just the advertised properties use the PSAdvertised property set; or, to see just the installed properties use the PSInstalled property set.

Notes

Example 1

C:\PS> get-msiproductinfo

This command outputs product information for all registered products assigned to this machine.

Example 2

C:\PS> get-msiproductinfo | where-object {$_.Name -match "Visual Studio"}

This command outputs all product information for products with "Visual Studio" in the name assigned to this machine.

Example 3

C:\PS> get-msiproductinfo -installcontext userunmanaged | where-object {$_.ProductState -eq "Installed"} | get-childitem

This command gets file information for all installed user-unmanaged products.

Example 4

C:\PS> get-msiproductinfo "{1862162E-3BBC-448F-AA63-49F33152D54A}"

This command gets product information for the given ProductCode.

Related Links

Last edited May 15, 2009 at 11:46 PM by heaths, version 1

Comments

heaths Apr 21, 2013 at 3:28 AM 
The Windows Installer APIs do not work across machine boundaries. You can use WMI but won't have quite the same Experience: get-wmiobject Win32_Product -computer name

Hecktor Apr 26, 2012 at 11:24 PM 
This is a very good cmdlet. Can it please be updated so that you can run this against a given ComputerName?

Get-MSIProductInfo -ComputerName