< Back

Repair-MSIProduct

Sat Jan 18, 2020 4:46 pm

NAME Repair-MSIProduct



SYNOPSIS

Repairs or modifies a product package.





SYNTAX

Repair-MSIProduct [-Chain] [-Force] -LiteralPath <String[]> [-Log <String>] [-PassThru] [-Properties <String[]>]

[-ReinstallMode <ReinstallModes>] [-ResultVariable <String>] [<CommonParameters>]



Repair-MSIProduct [-Path] <String[]> [-Chain] [-Force] [-Log <String>] [-PassThru] [-Properties <String[]>]

[-ReinstallMode <ReinstallModes>] [-ResultVariable <String>] [<CommonParameters>]



Repair-MSIProduct [-Chain] [-Force] [-Log <String>] [-PassThru] -Product <ProductInstallation[]> [-Properties

<String[]>] [-ReinstallMode <ReinstallModes>] [-ResultVariable <String>] [<CommonParameters>]



Repair-MSIProduct [-Chain] [-Force] [-Log <String>] [-PassThru] -ProductCode <String[]> [-Properties <String[]>]

[-ReinstallMode <ReinstallModes>] [-ResultVariable <String>] [<CommonParameters>]





DESCRIPTION

By default, simply repairs an existing product. This cmdlet can also add or remove features, patches, or even

uninstall but there are specialized cmdlets for that.



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 product package to repair. 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



-Path <String[]>

The path to a product package to repair. 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



-Product <ProductInstallation[]>

An existing product to repair or modify.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ProductCode <String[]>

The ProductCode of an existing product to repair or modify.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Properties <String[]>

Additional property=value pairs to pass during repair.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ReinstallMode <ReinstallModes>

The REINSTALLMODE to use. You can specify the value as a string in the format used by Windows Installer. The

default is equivalent to "omus".



Required? false

Position? named

Default value FileOlderVersion,MachineData,UserData,Shortcut

Accept pipeline input? True (ByPropertyName)

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



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







NOTES









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



repair-msiproduct -productcode {12341234-1234-1234-1234-123412341234} -reinstall "pecmsu" -log $env:TEMP\\repair.log



Repair the specified product using REINSTALLMODE="pecmsu" and log to the TEMP directory.

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



get-msiproductinfo -name *TEST* | repair-msiproduct -chain



Repair all products with ProductName matching TEST and show a single progress bar for the entire operation.



RELATED LINKS

Install-MSIProduct

Uninstall-MSIProduct