< Back

Get-MSIPatchInfo

Sat Jan 18, 2020 4:44 pm

NAME Get-MSIPatchInfo



SYNOPSIS

Gets patch information for registered patches.





SYNTAX

Get-MSIPatchInfo [[-ProductCode] <String[]>] [[-PatchCode] <String[]>] [-Everyone] [-Filter <PatchStates>]

[-UserContext <UserContexts>] [-UserSid <String>] [<CommonParameters>]





DESCRIPTION

Gets patch information for a given patch or for all patches registered to a given product or products. You can get

patch information for machine-registered patches, and patch information for both user-managed- and

user-unmanaged-registered patches for the current or another user.





PARAMETERS

-Everyone [<SwitchParameter>]

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



-Filter <PatchStates>

The state or states of patches to be retrieved. This can be a combination of "Applied", "Superseded",

"Obsoleted", "Registered", or "All".



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? true



-PatchCode <String[]>

The patch code or patch codes to retrieve patch information.



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ProductCode <String[]>

Specifies the ProductCode or ProductCodes to get patch information.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-UserContext <UserContexts>

The context for registered patches. 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 patches.



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







NOTES









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



get-msipatchinfo



This command outputs a table of patch information for all applied patches on the machine.

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



get-msipatchinfo -filter superseded | get-childitem



This command gets file information for superseded patches on the machine.

-------------------------- EXAMPLE 3 --------------------------



get-msiproductinfo | where-object {$_.Name -match "Office"} | get-msipatchinfo -filter all



This command gets patch information for all patches applied to products with "Office" in the name.



RELATED LINKS

Get-MSIProductInfo