Get-MSIProductInfo

Synopsis

Gets product information for registered products.

Syntax

  • Get-MSIProductInfo &#91;-UserSid <String>&#93; &#91;-InstallContext <InstallContext>&#93; &#91;-Everyone&#93;
  • Get-MSIProductInfo &#91;&#91;-ProductCode&#93; <String[]>&#93; &#91;-UserSid <String>&#93; &#91;-InstallContext <InstallContext>&#93; &#91;-Everyone&#93;

Detailed Description

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

Parameters

-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 False
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.Windows.Installer.ProductInfo: The base type for registered product information. There are separate types for advertised and installed products that extend ProductInfo.

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 Feb 8, 2009 at 8:21 PM by heaths, version 2

Comments

No comments yet.