This project is read-only.

Get-MSIPatchInfo

Synopsis

Gets patch information for registered patches.

Syntax

Get-MSIPatchInfo [[-ProductCode] <string[]>] [[-PatchCode] <string[]>] [-Filter <PatchStates>] [-UserContext <UserContexts>] [-UserSid <string>] [-Everyone] [<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|
Accepts pipeline input? false
Accept wildcard charactrs? false

-Filter <Microsoft.Deployment.WindowsInstaller.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|
Accepts pipeline input? true (ByPropertyName)
Accept wildcard charactrs? true

-PatchCode <string[]>

The patch code or patch codes to retrieve patch information.

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

-ProductCode <string[]>

Specifies the ProductCode or ProductCodes to get patch 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 patches. 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 patches.

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

Outputs

  • Microsoft.Deployment.WindowsInstaller.PatchInstallation: Information about patches applied or registered to a product or products.

Examples

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


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

Comments

No comments yet.