< Back

Install-MSIPatch

Sat Jan 18, 2020 4:45 pm

NAME Install-MSIPatch



SYNOPSIS

Installs a patch package or packages for all or only specified products.





SYNTAX

Install-MSIPatch [-Chain] [-Force] -LiteralPath <String[]> [-Log <String>] [-PassThru] [-ProductCode <String[]>]

[-Properties <String[]>] [-ResultVariable <String>] [-UserContext <UserContexts>] [-UserSid <String>]

[<CommonParameters>]



Install-MSIPatch [-Chain] [-Force] [-Log <String>] [-PassThru] -Patch <PatchInstallation[]> [-ProductCode

<String[]>] [-Properties <String[]>] [-ResultVariable <String>] [-UserContext <UserContexts>] [-UserSid <String>]

[<CommonParameters>]



Install-MSIPatch [-Path] <String[]> [-Chain] [-Force] [-Log <String>] [-PassThru] [-ProductCode <String[]>]

[-Properties <String[]>] [-ResultVariable <String>] [-UserContext <UserContexts>] [-UserSid <String>]

[<CommonParameters>]





DESCRIPTION

You can install one or more patch packages to all installed targets products or to just a subset of products.



Progress, warnings, and errors during the install are sent through the pipeline making this command fully

integrated.





PARAMETERS

-Chain [<SwitchParameter>]

Whether to install all packages together. If elevated, a single restore point is created for all packages in

the chain and reboots are suppressed when possible.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Whether to suppress all prompts.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-LiteralPath <String[]>

The path to a patch package to install. The value of -LiteralPath is used exactly as typed. No characters are

interpreted as wildcards.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Log <String>

The path to the log file. This use the file name as the base name and will append timestamp and

product-specific information.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Whether to pass the newly installed patch information after installation to the pipeline.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Patch <PatchInstallation[]>

Information about a patch or patches to install to other products.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Path <String[]>

The path to a patch package to install. Wildcards are permitted. You can specify * in any part of the path to

select all matching files.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? true



-ProductCode <String[]>

The ProductCode or ProductCodes to which the patch or patches should be applied.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Properties <String[]>

Additional property=value pairs to pass during install.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResultVariable <String>

The name of a variable to store operation results. Optionally prefix with "+" to combine results with existing

results variable.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-UserContext <UserContexts>

The user context for the product listed in the ProductCode parameter.



Required? false

Position? named

Default value Machine

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-UserSid <String>

The user security identifier for product listed in the ProductCode parameter.



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



install-msipatch .\\example.msp MSIFASTINSTALL=2



Install the example.msp patch package for all installed target products with MSIFASTINSTALL set to only do file

costing before installation.

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



get-msiproductinfo -name TEST | install-msipatch .\\example.msp -log $env:TEMP\\patch.log -passthru



Install the example.msp patch package only for the product with ProductName "TEST" and log to the TEMP directory.



Return information about the patch after logging.



RELATED LINKS

Uninstall-MSIPatch