Get-MSIProductInfo

Synopsis

Gets product information for registered products.

Syntax

Get-MSIProductInfo [[-ProductCode] <string[]>] [-UserContext <UserContexts>] [-UserSid <string>] [-Everyone] [<CommonParameters>]

Get-MSIProductInfo -Name <string[]> [-UserContext <UserContexts>] [-UserSid <string>] [-Everyone] [<CommonParameters>]

Description

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

Parameters

-Everyone <SwitchParameter>

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

Required? false
Position named
Default value|
Accepts pipeline input? false
Accept wildcard charactrs? false

-Name <string[]>

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

Required? true
Position named
Default value|
Accepts pipeline input? false
Accept wildcard charactrs? true

-ProductCode <string[]>

The ProductCode or ProductCodes to retrieve product information.

Required? false
Position 0
Default value|
Accepts pipeline input? true (ByPropertyName)
Accept wildcard charactrs? false

-UserContext <Microsoft.Deployment.WindowsInstaller.UserContexts>

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

Required? false
Position named
Default value All
Accepts pipeline input? true (ByPropertyName)
Accept wildcard charactrs? false

-UserSid <String>

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

Required? false
Position named
Default value|
Accepts pipeline input? true (ByPropertyName)
Accept wildcard charactrs? false

Outputs

  • 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.

Examples

Example 1

get-msiproductinfo

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

Example 2

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

get-msiproductinfo -installcontext userunmanaged | where-object {$_.ProductState -eq "Installed"} | get-childitem

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

Example 4

get-msiproductinfo "{1862162E-3BBC-448F-AA63-49F33152D54A}"

This command gets product information for the given ProductCode.

Related Links


Last edited Jun 11, 2013 at 9:39 AM by heaths, version 2

Comments

No comments yet.