< Back

Get-MSIProductInfo

Sat Jan 18, 2020 4:44 pm

NAME Get-MSIProductInfo



SYNOPSIS

Gets product information for registered products.





SYNTAX

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

[<CommonParameters>]



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

[<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 False

Accept pipeline input? False

Accept wildcard characters? false



-Name <String[]>

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



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-ProductCode <String[]>

The ProductCode or ProductCodes to retrieve product information.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-UserContext <UserContexts>

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



Required? false

Position? named

Default value All

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-UserSid <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Microsoft.Deployment.WindowsInstaller.ProductInstallation







NOTES









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

Get-MSIPatchInfo

Get-MSIRelatedProductInfo