< Back

Get-MSIComponentState

Sat Jan 18, 2020 4:43 pm

NAME Get-MSIComponentState



SYNOPSIS

Gets the install state for all authored components for one or more products installed on the machine.





SYNTAX

Get-MSIComponentState [-Product] <ProductInstallation[]> [<CommonParameters>]



Get-MSIComponentState [-ProductCode] <String[]> [-UserContext <UserContexts>] [-UserSid <String>]

[<CommonParameters>]





DESCRIPTION

Gets the install state for all components authored into one or more products. This includes all patches applied to

the product. In addition to the information returned from Get-MSIComponentInfo, the authored component identifier

from the Component table is attached along with a simple boolean property that determines if the component is

installed locally or not.





PARAMETERS

-Product <ProductInstallation[]>

The products for which authored component state is retrieved.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ProductCode <String[]>

The installed ProductCodes that define the components for which state information is retrieved.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

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

Microsoft.Deployment.WindowsInstaller.ProductInstallation







OUTPUTS

Microsoft.Deployment.WindowsInstaller.ComponentInstallation#State







NOTES









-------------------------- EXAMPLE 1 --------------------------



get-msicomponentstate "{877EF582-78AF-4D84-888B-167FDC3BCC11}"



Gets state information for all components authored into the product "{877EF582-78AF-4D84-888B-167FDC3BCC11}" and

all applied patches.

-------------------------- EXAMPLE 2 --------------------------



get-msiproductinfo -name *TEST* | get-msicomponentstate



Gets state information for all components authored into any product where the ProductName matches TEST .



RELATED LINKS

Get-MSIComponentInfo

Get-MSIProductInfo