Uninstall-MSIProduct

Synopsis

Uninstalls a product package or packages, or an existing product on the machine.

Syntax

Uninstall-MSIProduct [-Path] <string[]> [-Log <string>] [-Properties <string[]>] [-Chain] [-Force] [<CommonParameters>]

Uninstall-MSIProduct -Product <ProductInstallation[]> [-Log <string>] [-Properties <string[]>] [-Chain] [-Force] [<CommonParameters>]

Uninstall-MSIProduct -LiteralPath <string[]> [-Log <string>] [-Properties <string[]>] [-Chain] [-Force] [<CommonParameters>]

Uninstall-MSIProduct -ProductCode <string[]> [-Log <string>] [-Properties <string[]>] [-Chain] [-Force] [<CommonParameters>]

Description

This cmdlet, unlike related cmdlets, is designed to uninstalled one or more products. While there are ways to override this behavior, it is not recommend and you should instead use specialized cmdlets for this purpose. See the related links for suggestions.

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.

Required? false
Position named
Default value|
Accepts pipeline input? false
Accept wildcard charactrs? false

-Force <SwitchParameter>

Whether to suppress all prompts.

Required? false
Position named
Default value|
Accepts pipeline input? false
Accept wildcard charactrs? false

-LiteralPath <string[]>

The path to a product package to uninstall. The value of -LiteralPath is used exactly as typed. No characters are interpreted as wildcards.

Required? true
Position named
Default value|
Accepts pipeline input? true (ByPropertyName)
Accept wildcard charactrs? 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|
Accepts pipeline input? false
Accept wildcard charactrs? false

-Path <string[]>

The path to a product package to uninstall. Wildcards are permitted. You can specify * in any part of the path to select all matching files.

Required? true
Position 0
Default value|
Accepts pipeline input? true (ByValue, ByPropertyName)
Accept wildcard charactrs? true

-Product <Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>

The product to uninstall.

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

-ProductCode <string[]>

The ProductCode of a product to uninstall.

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

-Properties <string[]>

Additional property=value pairs to pass during uninstall.

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

Inputs

  • Microsoft.Deployment.WindowsInstaller.ProductInstallation: The product to uninstall.

Examples

Example 1

uninstall-msiproduct .\example.msi -log $env:TEMP\uninstall.log
Uninstall the example.msi product package and log to the TEMP directory.

Example 2

get-msiproductinfo -name *TEST* | uninstall-msiproduct -chain
Uninstall all products with ProductName matching TEST and show a single progress bar for the entire operation.

Related Links


Last edited Jul 2, 2013 at 6:57 AM by heaths, version 1

Comments

No comments yet.