Sunteți pe pagina 1din 90

Powershell Commandlets

MSI Module

Compiled by Les Lewis

This information was taken directly from the Get-Help files within the MSI Module commandlets.

This is for informational use, placed into an easy to read format.


Table of Contents
Get-MSIComponentState ............................................................................................................................ 9
SYNOPSIS ............................................................................................................................................... 9
SYNTAX .................................................................................................................................................... 9
DESCRIPTION ......................................................................................................................................... 9
PARAMETERS ........................................................................................................................................... 9
INPUTS .................................................................................................................................................. 10
OUTPUTS................................................................................................................................................ 10
RELATED LINKS .................................................................................................................................. 11
Get-MSISharedComponentInfo ................................................................................................................ 12
SYNOPSIS ............................................................................................................................................. 12
SYNTAX .................................................................................................................................................. 12
DESCRIPTION ....................................................................................................................................... 12
PARAMETERS ......................................................................................................................................... 12
INPUTS .................................................................................................................................................. 13
OUTPUTS................................................................................................................................................ 13
RELATED LINKS .................................................................................................................................. 13
Install-MSIAdvertisedFeature .................................................................................................................... 14
SYNOPSIS ............................................................................................................................................. 14
SYNTAX .................................................................................................................................................. 14
DESCRIPTION ....................................................................................................................................... 14
PARAMETERS ......................................................................................................................................... 14
INPUTS .................................................................................................................................................. 16
OUTPUTS................................................................................................................................................ 16
RELATED LINKS .................................................................................................................................. 16
Add-MSISource ......................................................................................................................................... 17
SYNOPSIS ............................................................................................................................................. 17
SYNTAX .................................................................................................................................................. 17
DESCRIPTION ....................................................................................................................................... 17
PARAMETERS ......................................................................................................................................... 17
INPUTS .................................................................................................................................................. 19
OUTPUTS................................................................................................................................................ 19
RELATED LINKS .................................................................................................................................. 19
Clear-MSISource....................................................................................................................................... 20
SYNOPSIS ............................................................................................................................................. 20
SYNTAX .................................................................................................................................................. 20
DESCRIPTION ....................................................................................................................................... 20
PARAMETERS ......................................................................................................................................... 20
INPUTS .................................................................................................................................................. 21
OUTPUTS................................................................................................................................................ 21
RELATED LINKS .................................................................................................................................. 21
Edit-MSIPackage ...................................................................................................................................... 22
SYNOPSIS ............................................................................................................................................. 22
SYNTAX .................................................................................................................................................. 22
DESCRIPTION ....................................................................................................................................... 22
PARAMETERS ......................................................................................................................................... 22
INPUTS .................................................................................................................................................. 23
OUTPUTS................................................................................................................................................ 23
RELATED LINKS .................................................................................................................................. 23
Export-MSIPatchXml ................................................................................................................................. 24
SYNOPSIS ............................................................................................................................................. 24
SYNTAX .................................................................................................................................................. 24
DESCRIPTION ....................................................................................................................................... 24
PARAMETERS ......................................................................................................................................... 24
INPUTS .................................................................................................................................................. 25
OUTPUTS................................................................................................................................................ 25
RELATED LINKS .................................................................................................................................. 25
Get-MSIComponentInfo ............................................................................................................................ 26
SYNOPSIS ............................................................................................................................................. 26
SYNTAX .................................................................................................................................................. 26
DESCRIPTION ....................................................................................................................................... 26
PARAMETERS ......................................................................................................................................... 26
INPUTS .................................................................................................................................................. 27
OUTPUTS................................................................................................................................................ 27
RELATED LINKS .................................................................................................................................. 27
Get-MSIFeatureInfo .................................................................................................................................. 28
SYNOPSIS ............................................................................................................................................. 28
SYNTAX .................................................................................................................................................. 28
DESCRIPTION ....................................................................................................................................... 28
PARAMETERS ......................................................................................................................................... 28
INPUTS .................................................................................................................................................. 29
OUTPUTS................................................................................................................................................ 29
RELATED LINKS .................................................................................................................................. 29
Get-MSIFileHash....................................................................................................................................... 30
SYNOPSIS ............................................................................................................................................. 30
SYNTAX .................................................................................................................................................. 30
DESCRIPTION ....................................................................................................................................... 30
PARAMETERS ......................................................................................................................................... 30
INPUTS .................................................................................................................................................. 31
OUTPUTS................................................................................................................................................ 31
RELATED LINKS .................................................................................................................................. 31
Get-MSIFileType ....................................................................................................................................... 32
SYNOPSIS ............................................................................................................................................. 32
SYNTAX .................................................................................................................................................. 32
DESCRIPTION ....................................................................................................................................... 32
PARAMETERS ......................................................................................................................................... 32
INPUTS .................................................................................................................................................. 33
OUTPUTS................................................................................................................................................ 33
RELATED LINKS .................................................................................................................................. 33
Get-MSILoggingPolicy .............................................................................................................................. 34
SYNOPSIS ............................................................................................................................................. 34
SYNTAX .................................................................................................................................................. 34
DESCRIPTION ....................................................................................................................................... 34
PARAMETERS ......................................................................................................................................... 34
INPUTS .................................................................................................................................................. 34
OUTPUTS................................................................................................................................................ 34
RELATED LINKS .................................................................................................................................. 35
Get-MSIPatchInfo...................................................................................................................................... 36
SYNOPSIS ............................................................................................................................................. 36
SYNTAX .................................................................................................................................................. 36
DESCRIPTION ....................................................................................................................................... 36
PARAMETERS ......................................................................................................................................... 36
INPUTS .................................................................................................................................................. 37
OUTPUTS................................................................................................................................................ 37
RELATED LINKS .................................................................................................................................. 38
Get-MSIPatchSequence ........................................................................................................................... 39
SYNOPSIS ............................................................................................................................................. 39
SYNTAX .................................................................................................................................................. 39
DESCRIPTION ....................................................................................................................................... 39
PARAMETERS ......................................................................................................................................... 39
INPUTS .................................................................................................................................................. 41
OUTPUTS................................................................................................................................................ 41
RELATED LINKS .................................................................................................................................. 41
Get-MSIProductInfo .................................................................................................................................. 42
SYNOPSIS ............................................................................................................................................. 42
SYNTAX .................................................................................................................................................. 42
DESCRIPTION ....................................................................................................................................... 42
PARAMETERS ......................................................................................................................................... 42
INPUTS .................................................................................................................................................. 43
OUTPUTS................................................................................................................................................ 43
RELATED LINKS .................................................................................................................................. 44
Get-MSIProperty ....................................................................................................................................... 45
SYNOPSIS ............................................................................................................................................. 45
SYNTAX .................................................................................................................................................. 45
DESCRIPTION ....................................................................................................................................... 45
PARAMETERS ......................................................................................................................................... 45
INPUTS .................................................................................................................................................. 47
OUTPUTS................................................................................................................................................ 47
RELATED LINKS .................................................................................................................................. 47
Get-MSIRelatedProductInfo ...................................................................................................................... 48
SYNOPSIS ............................................................................................................................................. 48
SYNTAX .................................................................................................................................................. 48
DESCRIPTION ....................................................................................................................................... 48
PARAMETERS ......................................................................................................................................... 48
INPUTS .................................................................................................................................................. 48
OUTPUTS................................................................................................................................................ 48
RELATED LINKS .................................................................................................................................. 49
Get-MSISource ......................................................................................................................................... 50
SYNOPSIS ............................................................................................................................................. 50
SYNTAX .................................................................................................................................................. 50
DESCRIPTION ....................................................................................................................................... 50
PARAMETERS ......................................................................................................................................... 50
INPUTS .................................................................................................................................................. 51
OUTPUTS................................................................................................................................................ 51
RELATED LINKS .................................................................................................................................. 51
Get-MSISummaryInfo ............................................................................................................................... 52
SYNOPSIS ............................................................................................................................................. 52
SYNTAX .................................................................................................................................................. 52
DESCRIPTION ....................................................................................................................................... 52
PARAMETERS ......................................................................................................................................... 52
INPUTS .................................................................................................................................................. 53
OUTPUTS................................................................................................................................................ 53
RELATED LINKS .................................................................................................................................. 53
Get-MSITable ............................................................................................................................................ 54
SYNOPSIS ............................................................................................................................................. 54
SYNTAX .................................................................................................................................................. 54
DESCRIPTION ....................................................................................................................................... 54
PARAMETERS ......................................................................................................................................... 55
INPUTS .................................................................................................................................................. 57
OUTPUTS................................................................................................................................................ 57
RELATED LINKS .................................................................................................................................. 58
Install-MSIPatch ........................................................................................................................................ 59
SYNOPSIS ............................................................................................................................................. 59
SYNTAX .................................................................................................................................................. 59
DESCRIPTION ....................................................................................................................................... 59
PARAMETERS ......................................................................................................................................... 59
INPUTS .................................................................................................................................................. 62
OUTPUTS................................................................................................................................................ 62
RELATED LINKS .................................................................................................................................. 62
Install-MSIProduct ..................................................................................................................................... 63
SYNOPSIS ............................................................................................................................................. 63
SYNTAX .................................................................................................................................................. 63
DESCRIPTION ....................................................................................................................................... 63
PARAMETERS ......................................................................................................................................... 63
INPUTS .................................................................................................................................................. 66
OUTPUTS................................................................................................................................................ 66
RELATED LINKS .................................................................................................................................. 66
Measure-MSIProduct ................................................................................................................................ 67
SYNOPSIS ............................................................................................................................................. 67
SYNTAX .................................................................................................................................................. 67
DESCRIPTION ....................................................................................................................................... 67
PARAMETERS ......................................................................................................................................... 67
INPUTS .................................................................................................................................................. 69
OUTPUTS................................................................................................................................................ 69
RELATED LINKS .................................................................................................................................. 69
Remove-MSILoggingPolicy ....................................................................................................................... 70
SYNOPSIS ............................................................................................................................................. 70
SYNTAX .................................................................................................................................................. 70
DESCRIPTION ....................................................................................................................................... 70
PARAMETERS ......................................................................................................................................... 70
INPUTS .................................................................................................................................................. 70
OUTPUTS................................................................................................................................................ 70
RELATED LINKS .................................................................................................................................. 70
Remove-MSISource .................................................................................................................................. 71
SYNOPSIS ............................................................................................................................................. 71
SYNTAX .................................................................................................................................................. 71
DESCRIPTION ....................................................................................................................................... 71
PARAMETERS ......................................................................................................................................... 71
INPUTS .................................................................................................................................................. 72
OUTPUTS................................................................................................................................................ 73
RELATED LINKS .................................................................................................................................. 73
Repair-MSIProduct.................................................................................................................................... 74
SYNOPSIS ............................................................................................................................................. 74
SYNTAX .................................................................................................................................................. 74
DESCRIPTION ....................................................................................................................................... 74
PARAMETERS ......................................................................................................................................... 74
INPUTS .................................................................................................................................................. 77
OUTPUTS................................................................................................................................................ 77
RELATED LINKS .................................................................................................................................. 77
Set-MSILoggingPolicy ............................................................................................................................... 78
SYNOPSIS ............................................................................................................................................. 78
SYNTAX .................................................................................................................................................. 78
DESCRIPTION ....................................................................................................................................... 78
PARAMETERS ......................................................................................................................................... 78
INPUTS .................................................................................................................................................. 79
OUTPUTS................................................................................................................................................ 79
RELATED LINKS .................................................................................................................................. 79
Test-MSIProduct ....................................................................................................................................... 80
SYNOPSIS ............................................................................................................................................. 80
SYNTAX .................................................................................................................................................. 80
DESCRIPTION ....................................................................................................................................... 80
PARAMETERS ......................................................................................................................................... 80
INPUTS .................................................................................................................................................. 82
OUTPUTS................................................................................................................................................ 82
RELATED LINKS .................................................................................................................................. 82
Uninstall-MSIPatch.................................................................................................................................... 83
SYNOPSIS ............................................................................................................................................. 83
SYNTAX .................................................................................................................................................. 83
DESCRIPTION ....................................................................................................................................... 83
PARAMETERS ......................................................................................................................................... 83
INPUTS .................................................................................................................................................. 86
OUTPUTS................................................................................................................................................ 86
RELATED LINKS .................................................................................................................................. 86
Uninstall-MSIProduct ................................................................................................................................ 87
SYNOPSIS ............................................................................................................................................. 87
SYNTAX .................................................................................................................................................. 87
DESCRIPTION ....................................................................................................................................... 87
PARAMETERS ......................................................................................................................................... 87
INPUTS .................................................................................................................................................. 89
OUTPUTS................................................................................................................................................ 89
RELATED LINKS .................................................................................................................................. 90
Get-MSIComponentState
SYNOPSIS
Gets the install state for all authored components for one or more
products installed on the machine.

SYNTAX
Get-MSIComponentState [-Product]
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
[<CommonParameters>]

Get-MSIComponentState [-ProductCode] <string[]> [-UserContext


<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid <String>]
[<CommonParameters>]

DESCRIPTION
Gets the install state for all components authored into one or more
products. This includes all patches applied to the product. In addition
to
the information returned from Get-MSIComponentInfo, the authored
component identifier from the Component table is attached along with a
simple
boolean property that determines if the component is installed
locally or not.

PARAMETERS
-Product
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
The products for which authored component state is retrieved.

Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-ProductCode <string[]>
The installed ProductCodes that define the components for which
state information is retrieved.

Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-UserContext [<Microsoft.Deployment.WindowsInstaller.UserContexts>]
The context for registered products. 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 products.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationProducts
for which authored component state is retrieved.

OUTPUTS
Microsoft.Deployment.WindowsInstaller.ComponentInstallation#StateState
information about the components authored into one or more products
and applied patches.

EXAMPLE 1

C:\PS>get-msicomponentstate "{877EF582-78AF-4D84-888B-167FDC3BCC11}"

Gets state information for all components authored into the product
"{877EF582-78AF-4D84-888B-167FDC3BCC11}" and all applied patches.

EXAMPLE 2

C:\PS>get-msiproductinfo -name *TEST* | get-msicomponentstate


Gets state information for all components authored into any product
where the ProductName matches *TEST*.

RELATED LINKS
Get-MSIComponentInfo
Get-MSIProductInfo
Get-MSISharedComponentInfo
SYNOPSIS
Gets information about shared components installed or registered for
the current user or the machine.

SYNTAX
Get-MSISharedComponentInfo [[-ComponentCode] <string[]>] [[-Count]
<Int32>] [<CommonParameters>]

DESCRIPTION
Shared components are component which are installed to the same
directory by one or more products. This cmdlet gets information about all
or
specified shared components installed for the current user or the
machine.

The output is already sorted by ComponentCode then ProductCode.

PARAMETERS
-ComponentCode [<string[]>]
The component GUIDs to retrieve information.

Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Count [<Int32>]
The minimum number count for shared components returned. The
absolute minimum is 2.

Required? false
Position? 1
Default value 2
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
(http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS

OUTPUTS
Microsoft.Deployment.WindowsInstaller.ComponentInstallationInformation
about the shared components installed or registered by one or more
products.

EXAMPLE 1

C:\PS>get-msisharedcomponentinfo -count 4 | format-table -view


Clients

Gets shared components installed by at least 4 products (or features)


and displays them in a table grouped by ComponentCode.

RELATED LINKS
Get-MSIComponentInfo
Install-MSIAdvertisedFeature
SYNOPSIS
Installs advertised features.

SYNTAX
Install-MSIAdvertisedFeature [[-FeatureName] <string[]>] [-Confirm]
[-Force] [-ProductCode <string[]>] [-Properties <string[]>] [-WhatIf]
[<CommonParameters>]

Install-MSIAdvertisedFeature [[-FeatureName] <string[]>] [-Confirm]


[-Force] -Product
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]> [-
Properties <string[]>] [-WhatIf] [<CommonParameters>]

DESCRIPTION
Some or all features can be advertised for a product. This may be by
design or incidental if certain patching problems occur. You can use this
cmdlet to to install some or all advertise features for some or all
products.

You can also scan for all advertised features using the -WhatIf
parameter to see what would be done to your system without performing
those
operations. Use -Confirm if you want to approve the operation to each
product.

PARAMETERS
-Confirm
Confirm installing advertised features for each product.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-FeatureName [<string[]>]
One or more specific features to install. Feature names are case-
sensitive.

Required? false
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Force
Perform each operation without confirmation.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Product
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
One or more products passed through the pipeline to limit which
products are scanned for advertised features.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-ProductCode [<string[]>]
One or more ProductCodes to limit which products are scanned for
advertised features.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Properties [<string[]>]
Additional properties to pass to the installation operation.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName,
FromRemainingArguments)
Accept wildcard characters? false

-WhatIf
Show what operations would be performed without actually
performing them.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationAn
existing product for which advertised features should be installed.

OUTPUTS

EXAMPLE 1

C:\PS>install-msiadvertisedfeature -whatif

Scans all features in all products for advertised features and


reports what operation would be performed.

EXAMPLE 2

C:\PS>get-msiproductinfo '{12341234-1234-1234-1234-123412341234}' |
install-msiadvertisedfeature Complete

Installs the 'Complete' feature for the specified product.

RELATED LINKS
Get-MSIProductInfo
Install-MSIProduct
Add-MSISource
SYNOPSIS
Adds a registered network source or URL from a product or patch.

SYNTAX
Add-MSISource [-ProductCode] <String> -LiteralPath <string[]> [-
PassThru] [-PatchCode <String>] [-UserContext
<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid
<String>] [<CommonParameters>]

Add-MSISource [-ProductCode] <String> [-Path] <string[]> [-PassThru]


[-PatchCode <String>] [-UserContext
<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid
<String>] [<CommonParameters>]

DESCRIPTION
Windows Installer products and patches can have zero or more
registered locations that direct Windows Installer where to look for
package source.
This cmdlet will add a network source or URL to a product or patch
and optionally return the remaining registered source locations through
the
pipeline.

PARAMETERS
-LiteralPath <string[]>
The directory or URL to register. The value of -LiteralPath is
used exactly as typed. No characters are interpreted as wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-PassThru
Whether to return the remaining registered source through the
pipeline.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-PatchCode [<String>]
The patch code for a patch.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Path <string[]>
The directory or URL to register. Wildcards are permitted. You
can specify * in any part of the path to select all matching files.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

-ProductCode <String>
The ProductCode for a product or applied patch.

Required? true
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-UserContext [<Microsoft.Deployment.WindowsInstaller.UserContexts>]
The user context for a product or patch.

Required? false
Position? named
Default value All
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-UserSid [<String>]
The user SID for a product or patch.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS

OUTPUTS
Microsoft.Tools.WindowsInstaller.SourceInfoSource information for
an installed product.

Microsoft.Tools.WindowsInstaller.PatchSourceInfoSource
information for an applied patch.

EXAMPLE 1

C:\PS>add-msisource '{707ABAE4-4DC5-478C-9D36-7CC5C1A85A3C}'
'C:\Package Cache\'

Adds the C:\Package Cache source location from the specified product.

RELATED LINKS
Clear-MSISource
Get-MSISource
Remove-MSISource
Clear-MSISource
SYNOPSIS
Clears all registered network sources and URLs from a product or
patch.

SYNTAX
Clear-MSISource [-ProductCode] <String> [-PatchCode <String>] [-
UserContext <Microsoft.Deployment.WindowsInstaller.UserContexts>] [-
UserSid
<String>] [<CommonParameters>]

DESCRIPTION
Windows Installer products and patches can have zero or more
registered locations that direct Windows Installer where to look for
package source.
This cmdlet will clear all network sources and URLs from a product or
patch.

PARAMETERS
-PatchCode [<String>]
The patch code for a patch.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-ProductCode <String>
The ProductCode for a product or applied patch.

Required? true
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-UserContext [<Microsoft.Deployment.WindowsInstaller.UserContexts>]
The user context for a product or patch.

Required? false
Position? named
Default value All
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-UserSid [<String>]
The user SID for a product or patch.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Tools.WindowsInstaller.SourceInfoSource information for
an installed product.

Microsoft.Tools.WindowsInstaller.PatchSourceInfoSource
information for an applied patch.

EXAMPLE 1

C:\PS>get-msiproductinfo '{707ABAE4-4DC5-478C-9D36-7CC5C1A85A3C}' |
clear-msisource

Clears all registered source from the specified product.

RELATED LINKS
Add-MSISource
Get-MSISource
Remove-MSISource
Edit-MSIPackage
SYNOPSIS
Opens an install package or patch in Orca or another registered
editor.

SYNTAX
Edit-MSIPackage [[-Path] <string[]>] [-Wait] [<CommonParameters>]

Edit-MSIPackage -LiteralPath <string[]> [-Wait] [<CommonParameters>]

DESCRIPTION
Orca can be installed from the Windows SDK. If installed, MSI and MSP
packages can be opened in Orca. If Orca is not installed, any application
registered with the "Edit" verb for .msi or .msp file extensions is
used.

PARAMETERS
-LiteralPath <string[]>
The path to a package to open. The value of -LiteralPath is used
exactly as typed. No characters are interpreted as wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Path [<string[]>]
The path to a package to open. Wildcards are permitted. You can
specify * in any part of the path to select all matching files.

Required? false
Position? 0
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

-Wait
Wait until the process is closed before opening another package.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

EXAMPLE 1

C:\PS>get-childitem -filter *.msi -recurse | edit-msipackage

Opens all install packages in the current directory or subdirectories


in separate instances of Orca.

RELATED LINKS
Export-MSIPatchXml
SYNOPSIS
Exports an XML representation of applicability information from a
patch package.

SYNTAX
Export-MSIPatchXml [-Path] <String> [-FilePath] <String> [-Encoding
<System.Text.Encoding>] [-Formatted] [<CommonParameters>]

DESCRIPTION
Windows Installer defines an XML schema that is representational of a
patch package - specifically its applicability information. This allows
administrators and bundle developers to not require downloading the
patch package just to find out if it's applicable or even already
installed.

This XML file can be passed to Get-MSIPatchSequence along with other


XML files or patch packages.

PARAMETERS
-Encoding [<System.Text.Encoding>]
The encoding to use for the output XML file.

Required? false
Position? named
Default value UTF8
Accept pipeline input? false
Accept wildcard characters? false

-FilePath <String>
The path to the output XML file.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Formatted
Whether to indent the XML file.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Path <String>
The path to the patch package from which XML is exported.

Required? true
Position? 0
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
EXAMPLE 1

C:\PS>export-msipatchxml .\example.msp .\example.xml -formatted

Exports formatted XML from the example.msp patch package in the


current directory.

RELATED LINKS
Get-MSIPatchSequence
Get-MSIComponentInfo
SYNOPSIS
Gets information about components registered to the current user and
the machine.

SYNTAX
Get-MSIComponentInfo [[-ComponentCode] <string[]>]
[<CommonParameters>]

Get-MSIComponentInfo [-ComponentCode] <string[]> [-ProductCode]


<String> [<CommonParameters>]

DESCRIPTION
Gets information about all the components registered to the current
user and to the machine. You can also limit the components to only those
installed by a particular product.

The information includes the state of the component and the path all
based on the product that installed it, since multiple products can
install
the same component even to different locations.

PARAMETERS
-ComponentCode [<string[]>]
The component GUIDs to retrieve information.

Required? false
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-ProductCode <String>
The ProductCode of the product that installed the components to
retrieve information.

Required? true
Position? 1
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Deployment.WindowsInstaller.ComponentInstallationInformation
about the components installed or registered by one or multiple
products.

EXAMPLE 1

C:\PS>get-msicomponentinfo

This command gets all components installed or registered to the


current user or to the machine.

EXAMPLE 2

C:\PS>get-msiproductinfo "{90120000-00BA-0409-0000-0000000FF1CE}" |
get-msicomponentinfo -componentcode "{90120000-00BA-0409-0000-
0E32E9F6E558}"

This command gets information for the component "{90120000-00BA-0409-


0000-0E32E9F6E558}" installed by the product
"{90120000-00BA-0409-0000-0000000FF1CE}".

RELATED LINKS
Get-MSIComponentState
Get-MSIFeatureInfo
SYNOPSIS
Gets information about features of an installed or advertised
product.

SYNTAX
Get-MSIFeatureInfo [-Product]
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
[<CommonParameters>]

Get-MSIFeatureInfo [-ProductCode] <String> [-FeatureName] <string[]>


[<CommonParameters>]

DESCRIPTION
A product must install or advertise one or more features. This cmdlet
can query feature of a product or products to determine their state and
optional usage data.

PARAMETERS
-FeatureName <string[]>
The names of the features for which information is retrieved.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Product
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
The ProductInstallation object that installed or advertised
specified features.

Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-ProductCode <String>
The ProductCode that installed or advertised specified features.

Required? true
Position? 0
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationThe
product or products for which features are enumerated.

OUTPUTS
Microsoft.Deployment.WindowsInstaller.FeatureInstallationInformation
about the features installed or advertised by one or multiple products.

EXAMPLE 1

C:\PS>get-msiproductinfo "{90120000-00BA-0409-0000-0000000FF1CE}" |
get-msifeatureinfo | format-table -view Usage

Gets the usage information for all the features installed by the
product "{90120000-00BA-0409-0000-0000000FF1CE}".

EXAMPLE 2

C:\PS>get-msifeatureinfo "{90120000-00BA-0409-0000-0000000FF1CE}"
"GrooveFilesIntl_1033"

Gets state information for the feature "GrooveFilesIntl_1033"


installed by product "{90120000-00BA-0409-0000-0000000FF1CE}".

RELATED LINKS
Get-MSIProductInfo
Get-MSIFileHash
SYNOPSIS
Gets a hash of a file in a Windows Installer-compatible format.

SYNTAX
Get-MSIFileHash [[-Path] <string[]>] [-PassThru] [<CommonParameters>]

Get-MSIFileHash -LiteralPath <string[]> [-PassThru]


[<CommonParameters>]

DESCRIPTION
Get-MSIFileHash returns a 128-bit file hash in 4 separate parts,
compatible with columns in the MsiFileHash table in Windows Installer
packages.
All non-versioned files should contain this hash.

You can optionally add these HashPart1, HashPart2, HashPart3, and


HashPart4 properties to FileSystem items.

PARAMETERS
-LiteralPath <string[]>
The path to the item or items which must resolve to a file system
path. The value of -LiteralPath is used exactly as typed. No characters
are
interpreted as wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-PassThru
Passes the item or items passed into this cmdlet through the
pipeline with additional properties for the file hash.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Path [<string[]>]
The path to the item or items which must resolve to a file system
path. You can specify * in any part of the path to select all matching
files.

Required? false
Position? 0
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Tools.WindowsInstaller.FileHashIf -passthru is not
specified, Get-MSIFileHash returns a FileHash object containing the file
hash in
4 parts.

System.IO.DirectoryInfoIf -passthru is specified and the input


object is a directory, the directory is returned.

System.IO.FileInfoIf -passthru is specified and the input object


is a file, the file is returned.

EXAMPLE 1

C:\PS>get-msifilehash -path * | format-table -auto

This command outputs the file hash of every file in the current
directory as a table.

EXAMPLE 2

C:\PS>get-childitem | where-object {$_.PSIsContainer -eq $False} |


get-msifilehash -passthru | format-table Name, MSI* -auto

This command outputs the name and hash parts of each file in the
current directory.

RELATED LINKS
Get-MSIFileType
Get-MSIFileType
SYNOPSIS
Gets the Windows Installer file type.

SYNTAX
Get-MSIFileType [[-Path] <string[]>] [-PassThru] [<CommonParameters>]

Get-MSIFileType -LiteralPath <string[]> [-PassThru]


[<CommonParameters>]

DESCRIPTION
Gets the Windows Installer file type for a given file or files.

You can optionally add this MSIFileType property to FileSystem items.

PARAMETERS
-LiteralPath <string[]>
The path to the item or items which must resolve to a file system
path. The value of -LiteralPath is used exactly as typed. No characters
are
interpreted as wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-PassThru
Passes the item or items passed into this cmdlet through the
pipeline with the additional property for the file type.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Path [<string[]>]
The path to the item or items which must resolve to a file system
path. You can specify * in any part of the path to select all matching
files.

Required? false
Position? 0
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
stringIf -passthru is not specified, Get-MSIFileType returns a
string object.

System.IO.DirectoryInfoIf -passthru is specified and the input


object is a directory, the directory is returned.

System.IO.FileInfoIf -passthru is specified and the input object


is a file, the file is returned.

EXAMPLE 1

C:\PS>get-msifilehash -path $env:WINDIR\Installer

This command outputs the file type of files in the Windows Installer
cache directory.

EXAMPLE 2

C:\PS>get-childitem -path $env:WINDIR\Installer\* | where-object


{$_.PSIsContainer -eq $False} | get-msifiletype -passthru | format-table
Name, MSIFileType -auto

This command outputs the Windows Installer file type for files in the
Windows Installer cache directory.

RELATED LINKS
Get-MSIFileHash
Get-MSILoggingPolicy
SYNOPSIS
Gets the Windows Installer logging policy.

SYNTAX
Get-MSILoggingPolicy [-Raw] [<CommonParameters>]

DESCRIPTION
The Windows Installer logging policy determines whether logs are
generated by default and how much information they contain. This cmdlet
gets the
current logging policy and can return the logging modes as a
collection of strings or the raw string value from the registry.

PARAMETERS
-Raw
Returns the raw string value from the registry.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
stringIf -raw is specified and a logging policy set, the raw
registry value is returned.

string[]The default output type consisting of zero or more


logging modes that are set in the registry.
RELATED LINKS
Remove-MSILoggingPolicy
Set-MSILoggingPolicy
Get-MSIPatchInfo
SYNOPSIS
Gets patch information for registered patches.

SYNTAX
Get-MSIPatchInfo [[-ProductCode] <string[]>] [[-PatchCode]
<string[]>] [-Everyone] [-Filter
<Microsoft.Deployment.WindowsInstaller.PatchStates>]
[-UserContext <Microsoft.Deployment.WindowsInstaller.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
Whether to retrieve user-managed or user-unmanaged patches for
everyone.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? 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
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
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
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? 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
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
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Deployment.WindowsInstaller.PatchInstallationInformation about
patches applied or registered to a product or products.

EXAMPLE 1
C:\PS>get-msipatchinfo

This command outputs a table of patch information for all applied


patches on the machine.

EXAMPLE 2

C:\PS>get-msipatchinfo -filter superseded | get-childitem

This command gets file information for superseded patches on the


machine.

EXAMPLE 3

C:\PS>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
Get-MSIPatchSequence
SYNOPSIS
Given a list of patches or patch XML, outputs the sequence of
applicable patches for a product or products.

SYNTAX
Get-MSIPatchSequence [-Path] <string[]> [-PackagePath] <string[]>
[<CommonParameters>]

Get-MSIPatchSequence [-PackagePath] <string[]> -LiteralPath


<string[]> [<CommonParameters>]

Get-MSIPatchSequence [-ProductCode] <string[]> -LiteralPath


<string[]> [-UserContext
<Microsoft.Deployment.WindowsInstaller.UserContexts>]
[-UserSid <String>] [<CommonParameters>]

Get-MSIPatchSequence [-Path] <string[]> [-ProductCode] <string[]> [-


UserContext <Microsoft.Deployment.WindowsInstaller.UserContexts>] [-
UserSid
<String>] [<CommonParameters>]

DESCRIPTION
Patch packages or patch XML files can be specified along with a list
of products. Each patch is added to a list and after all patches
specified
are processed, the sequence for all applicable patches is output for
each product specified.

By default, the table format is used with a grouping for each product
specified.

PARAMETERS
-LiteralPath <string[]>
The path to a package to open. The value of -LiteralPath is used
exactly as typed. No characters are interpreted as wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-PackagePath <string[]>
The path to a product package or packages for which the patch
sequence is returned.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Path <string[]>
The path to a package to open. Wildcards are permitted. You can
specify * in any part of the path to select all matching files.

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

-ProductCode <string[]>
The ProductCode or ProductCodes for products for which the patch
sequence is returned.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-UserContext [<Microsoft.Deployment.WindowsInstaller.UserContexts>]
The user context for the product listed in the ProductCode
parameter.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-UserSid [<String>]
The user security identifier for product listed in the
ProductCode parameter.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Tools.WindowsInstaller.PatchSequenceThe sequence
information for each applicable patch to a product or product package.

RELATED LINKS
Get-MSIProductInfo
SYNOPSIS
Gets product information for registered products.

SYNTAX
Get-MSIProductInfo [[-ProductCode] <string[]>] [-Everyone] [-
UserContext <Microsoft.Deployment.WindowsInstaller.UserContexts>] [-
UserSid
<String>] [<CommonParameters>]

Get-MSIProductInfo [-Everyone] -Name <string[]> [-UserContext


<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid <String>]
[<CommonParameters>]

DESCRIPTION
Gets product information for all per-machine, user-managed, and user-
unmanaged products on the machine.

PARAMETERS
-Everyone
Whether to retrieve user-managed or user-unmanaged products for
everyone.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Name <string[]>
The name of a product or products to retrieve. Wildcards are
supported.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-ProductCode [<string[]>]
The ProductCode or ProductCodes to retrieve product information.

Required? false
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserContext [<Microsoft.Deployment.WindowsInstaller.UserContexts>]
The context for registered products. 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 products.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationInformation
about the installed or advertised product. To see just the advertised
properties use the PSAdvertised property set; or, to see just the
installed properties use the PSInstalled property set.

EXAMPLE 1

C:\PS>get-msiproductinfo

This command outputs product information for all registered products


assigned to this machine.

EXAMPLE 2

C:\PS>get-msiproductinfo | where-object {$_.Name -match "Visual


Studio"}
This command outputs all product information for products with
"Visual Studio" in the name assigned to this machine.

EXAMPLE 3

C:\PS>get-msiproductinfo -installcontext userunmanaged | where-object


{$_.ProductState -eq "Installed"} | get-childitem

This command gets file information for all installed user-unmanaged


products.

EXAMPLE 4

C:\PS>get-msiproductinfo "{1862162E-3BBC-448F-AA63-49F33152D54A}"

This command gets product information for the given ProductCode.

RELATED LINKS
Get-MSIPatchInfo
Get-MSIRelatedProductInfo
Get-MSIProperty
SYNOPSIS
Gets properties from a product or patch package.

SYNTAX
Get-MSIProperty [[-Property] <string[]>] [-Path] <string[]> [-
PassThru] [-Patch <string[]>] [-Transform <string[]>]
[<CommonParameters>]

Get-MSIProperty [[-Property] <string[]>] -LiteralPath <string[]> [-


PassThru] [-Patch <string[]>] [-Transform <string[]>]
[<CommonParameters>]

DESCRIPTION
Selects all or matching properties from a product or patch package
and either returns them to the pipeline or attaches them to a file object
for
a product or patch package if -PassThru is specified. When propertie
are attached to a file object you can select them all using the
"MSIProperties" property set.

PARAMETERS
-LiteralPath <string[]>
The path to a product or patch package to open. The value of -
LiteralPath is used exactly as typed. No characters are interpreted as
wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-PassThru
Whether to pass the file object back to the pipeline with
selected properties attached.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Patch [<string[]>]
The path to a patch package to apply to the product package.
Multiple patches are applied in authored sequence order.
Wildcards are permitted. You can specify * in any part of the
path to select all matching files.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Path <string[]>
The path to a product or patch package to open. Wildcards are
permitted. You can specify * in any part of the path to select all
matching
files.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

-Property [<string[]>]
Optional list of property names to select. Wildcard are
permitted.

Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Transform [<string[]>]
The path to a transform to apply to the product package.

Wildcards are permitted. You can specify * in any part of the


path to select all matching files.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS

OUTPUTS
Microsoft.Tools.WindowsInstaller.RecordThe selected properties
from the product or patch package.

System.IO.FileInfoThe original file object with selected


properties attached and referenced by the "MSIProperties" property set.

EXAMPLE 1

C:\PS>get-msiproperty Product*, UpgradeCode -path example.msi

Gets the identifying properties from the example.msi product package.

EXAMPLE 2

C:\PS>get-childitem -filter *.msi | get-msiproperty -passthru |


select Name, MSIProperties

Attaches all properties from each product package and shows them all
along with the file name.

RELATED LINKS
Get-MSITable
Get-MSIRelatedProductInfo
SYNOPSIS
Gets product information for related products.

SYNTAX
Get-MSIRelatedProductInfo [-UpgradeCode] <string[]>
[<CommonParameters>]

DESCRIPTION
Gets product information for related products based on an
UpgradeCode.

PARAMETERS
-UpgradeCode <string[]>
The UpgradeCode for related products.

Required? true
Position? 0
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationInformation
about the installed or advertised product. To see just the installed
properties use the PSInstalled property set.

EXAMPLE 1

C:\PS>get-msirelatedproductinfo "{B4160C68-1EA5-458F-B1EA-
E69B41E44007}"

This command gets all related products based on their UpgradeCode.


RELATED LINKS
Get-MSIProductInfo
Get-MSISource
SYNOPSIS
Gets the registered network source or URLs for a product or patch.

SYNTAX
Get-MSISource [-ProductCode] <String> [-PatchCode <String>] [-
UserContext <Microsoft.Deployment.WindowsInstaller.UserContexts>] [-
UserSid
<String>] [<CommonParameters>]

DESCRIPTION
Windows Installer products and patches can have zero or more
registered locations that direct Windows Installer where to look for
package source.
This cmdlet will enumerate those locations registered to a product or
patch.

PARAMETERS
-PatchCode [<String>]
The patch code for a patch.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-ProductCode <String>
The ProductCode for a product or applied patch.

Required? true
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-UserContext [<Microsoft.Deployment.WindowsInstaller.UserContexts>]
The user context for a product or patch.

Required? false
Position? named
Default value All
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-UserSid [<String>]
The user SID for a product or patch.
Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Tools.WindowsInstaller.SourceInfoSource information for
an installed product.

Microsoft.Tools.WindowsInstaller.PatchSourceInfoSource
information for an applied patch.

EXAMPLE 1

C:\PS>get-msiproductinfo | get-msisource

Gets the registered source for all installed products on the machine.

RELATED LINKS
Add-MSISource
Clear-MSISource
Remove-MSISource
Get-MSISummaryInfo
SYNOPSIS
Gets the summary information from a product or patch package, or from
a transform.

SYNTAX
Get-MSISummaryInfo [[-Path] <string[]>] [-IncludeTransforms]
[<CommonParameters>]

Get-MSISummaryInfo [-IncludeTransforms] -LiteralPath <string[]>


[<CommonParameters>]

DESCRIPTION
The summary information stream is used by Windows Installer to
determine applicability, version requirements, and more. Use this command
to view
the summary information for a product or patch package, or a
transform. The properties returned are adapted for each file type.

PARAMETERS
-IncludeTransforms
Whether to enumerate the transforms within a patch package.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-LiteralPath <string[]>
The path to a package or transform to open. The value of -
LiteralPath is used exactly as typed. No characters are interpreted as
wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Path [<string[]>]
The path to a package or transform to open. Wildcards are
permitted. You can specify * in any part of the path to select all
matching files.

Required? false
Position? 0
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Deployment.WindowsInstaller.Package.TransformInfoSummary
information for a transform within a patch package.

Microsoft.Tools.WindowsInstaller.SummaryInfoSummary information
for a product or patch package, or a transform.

EXAMPLE 1

C:\PS>get-childitem -filter *.ms* | get-msisummaryinfo

Gets summary information for any file matching *.ms*, including .msi,
.msp, and .mst packages.

EXAMPLE 2

C:\PS>get-msisummaryinfo *.msp -includetransforms

Gets the patch and embedded transform summary information.

RELATED LINKS
Get-MSITable
SYNOPSIS
Selects records from a table or custom query from a product or patch
package.

SYNTAX
Get-MSITable [[-Table] <String>] [-Path] <string[]> [-Patch
<string[]>] [-Transform <string[]>] [<CommonParameters>]

Get-MSITable [-Product]
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]> [-
IgnoreMachineState] -Query <String> [<CommonParameters>]

Get-MSITable [[-Table] <String>] [-Product]


<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]> [-
IgnoreMachineState]
[<CommonParameters>]

Get-MSITable -LiteralPath <string[]> [-Patch <string[]>] -Query


<String> [-Transform <string[]>] [<CommonParameters>]

Get-MSITable [[-Table] <String>] -LiteralPath <string[]> [-Patch


<string[]>] [-Transform <string[]>] [<CommonParameters>]

Get-MSITable [-Path] <string[]> [-Patch <string[]>] -Query <String>


[-Transform <string[]>] [<CommonParameters>]

DESCRIPTION
You can query all records from a table or records matching a custom
query from a product or patch package. The Windows Installer SDK has more
information about custom queries, since the SQL-like syntax is rather
constrained.

When no table or query is provided all tables from the package are
displayed. Specifying a patch or transform will cause tables added by the
patch or transform to be displayed, along with the operation
performed on that table by the patch or transform in the MSIOperation
property.

Records are returned with properties matching column names. If


records are selected from a single table, the table name is also part of
the type
name queryable from the PSTypeNames object property. If the column
name is prefixed with the table name - required to disambiguate names, or
optional otherwise - a property is returned as typed in the original
query string. Note that Windows PowerShell allows periods in property
names
but may require in some scenarios that a property name with periods
is contained in quotes, like 'File.Attributes'.

For attribute columns in standard Windows Installer tables, you may


also query for specific attribute values by specifying a special property
name on the end of the attribute column name, like
'File.Attributes'.HasVital, to query for any columns that have the
attribute value set. You
can define an $MsiAttributeColumnFormat variable to control the
display format of attribute columns, though the underlying value will not
be
changed. Run 'help about_MSI' for more information.

Note that patch packages do not typically have more than a couple of
tables. The patch has to be applied to a product package to view any
changes
it has made. When applying a patch or transforms, records will
contain an operation performed on the record by the patch or transform in
the
MSIOperation property.

PARAMETERS
-IgnoreMachineState
Whether to apply any patches current installed to the product.

Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false

-LiteralPath <string[]>
The path to a product package to open. The value of -LiteralPath
is used exactly as typed. No characters are interpreted as wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Patch [<string[]>]
The path to a patch package to apply to the product package.
Multiple patches are applied in authored sequence order.

Wildcards are permitted. You can specify * in any part of the


path to select all matching files.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? true

-Path <string[]>
The path to a product package to open. Wildcards are permitted.
You can specify * in any part of the path to select all matching files.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

-Product
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
An installed product to query.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-Query <String>
A custom query for which records are selected. Ambiguous column
names must be prefixed with the table name to which they belong.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Table [<String>]
The table from which all records are selected. If no table name
is provided all tables in the database are displayed.

Required? false
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Transform [<string[]>]
The path to a transform to apply to the product package.

Wildcards are permitted. You can specify * in any part of the


path to select all matching files.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? true

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationAn
existing product to query. By default any patches already applied to the
product
are applied to the database.

OUTPUTS
Microsoft.Tools.WindowsInstaller.RecordSelected records for a
table or custom query where properties match column names.

Microsoft.Tools.WindowsInstaller.TableInfoInformation about a
table contained in the database or added by a patch or transform.

EXAMPLE 1

C:\PS>get-msitable .\example.msi -table Property

Gets all records from the Property table.

EXAMPLE 2

C:\PS>$productCode = get-msitable .\example.msi -table Property |


where-object { $_.Property -eq "ProductCode" } | select-object -expand
Value

Selects just the ProductCode property from the example.msi package


and assigns the value to a variable.

EXAMPLE 3
C:\PS>get-childitem -filter *.msi | get-msitable -query "SELECT
ComponentId, FileName, FileSize FROM Component, File WHERE Component_ =
Component"

Selects the component GUID, file name, and file size for all files in
all packages in the current directory.

EXAMPLE 4

C:\PS>get-msitable .\example.msi -query "SELECT ComponentId,


FileName, File.Attributes FROM Component, File WHERE Component_ =
Component" | where-object { $_.'File.Attributes'.HasVital }

Selects all vital files and displays the component GUID, file name,
and all file attribtes from the example.msi package.

Note that in the query filter the 'File.Attributes' column is


contained in quotes; otherwise, Windows PowerShell will attempt to filter
based on
an Attributes property of a File property of the current pipeline
object. The 'File.Attributes' column is contained in quotes in the
original
query because the Component table also contains a column named
Attributes. Windows Installer requires that you disambiguate column
names.

EXAMPLE 5

C:\PS>get-msitable .\example.msi -patch .\example.msp | get-msitable


| where-object { $_.MSIOperation -ne 'None' }

Gets all records in the example.msi package added or modified by the


example.msp patch package.

EXAMPLE 6

C:\PS>get-msiproductinfo '{877EF582-78AF-4D84-888B-167FDC3BCC11}' |
get-msitable -table Property

Selects records from the installed product along with any patches
currently installed.

RELATED LINKS
Get-MSIProductInfo
Get-MSIProperty
Install-MSIPatch
SYNOPSIS
Installs a patch package or packages for all or only specified
products.

SYNTAX
Install-MSIPatch [-Path] <string[]> [-Chain] [-Force] [-Log <String>]
[-PassThru] [-ProductCode <string[]>] [-Properties <string[]>]
[-ResultVariable <String>] [-UserContext
<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid <String>]
[<CommonParameters>]

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


<Microsoft.Deployment.WindowsInstaller.PatchInstallation[]> [-ProductCode
<string[]>] [-Properties <string[]>] [-ResultVariable <String>] [-
UserContext <Microsoft.Deployment.WindowsInstaller.UserContexts>] [-
UserSid
<String>] [<CommonParameters>]

Install-MSIPatch [-Chain] [-Force] -LiteralPath <string[]> [-Log


<String>] [-PassThru] [-ProductCode <string[]>] [-Properties <string[]>]
[-ResultVariable <String>] [-UserContext
<Microsoft.Deployment.WindowsInstaller.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
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
Accept pipeline input? false
Accept wildcard characters? false

-Force
Whether to suppress all prompts.

Required? false
Position? named
Default value
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
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
Accept pipeline input? false
Accept wildcard characters? false

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

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Patch <Microsoft.Deployment.WindowsInstaller.PatchInstallation[]>
Information about a patch or patches to install to other
products.

Required? true
Position? named
Default value
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
Accept pipeline input? true (ByValue, ByPropertyName)
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
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
Accept pipeline input? true (FromRemainingArguments)
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
Accept pipeline input? false
Accept wildcard characters? false

-UserContext [<Microsoft.Deployment.WindowsInstaller.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
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Deployment.WindowsInstaller.PatchInstallationInformation for
the newly installed patch or patches.

EXAMPLE 1

C:\PS>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

C:\PS>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
Install-MSIProduct
SYNOPSIS
Installs or modifies a product package.

SYNTAX
Install-MSIProduct [-Path] <string[]> [-Chain] [-Destination
<String>] [-Force] [-Log <String>] [-PassThru] [-Properties <string[]>]
[-ResultVariable <String>] [<CommonParameters>]

Install-MSIProduct [-Chain] [-Force] [-Log <String>] [-PassThru] -


Product <Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
[-Properties <string[]>] [-ResultVariable <String>]
[<CommonParameters>]

Install-MSIProduct [-Chain] [-Destination <String>] [-Force] -


LiteralPath <string[]> [-Log <String>] [-PassThru] [-Properties
<string[]>]
[-ResultVariable <String>] [<CommonParameters>]

Install-MSIProduct [-Chain] [-Force] [-Log <String>] [-PassThru] -


ProductCode <string[]> [-Properties <string[]>] [-ResultVariable
<String>]
[<CommonParameters>]

DESCRIPTION
Installs a product package or adds features to existing products.

Ultimately, this cmdlet can install, modify, repair, and even


uninstall a product package or install patches but specialized cmdlets
have been
added for those tasks.

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

PARAMETERS
-Chain
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
Accept pipeline input? false
Accept wildcard characters? false

-Destination [<String>]
The target directory where the product should be installed.

Note that the product package must be authored to support


installing to TARGETDIR.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Force
Whether to suppress all prompts.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-LiteralPath <string[]>
The path to a product package to install. The value of -
LiteralPath is used exactly as typed. No characters are interpreted as
wildcards.

Required? true
Position? named
Default value
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
Accept pipeline input? false
Accept wildcard characters? false

-PassThru
Whether to pass the newly installed product information after
installation to the pipeline.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Path <string[]>
The path to a product 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
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

-Product
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
An existing product to modify.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-ProductCode <string[]>
The ProductCode of an existing product to modify.

Required? true
Position? named
Default value
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
Accept pipeline input? true (FromRemainingArguments)
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
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationAn
existing product to modify.

OUTPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationInformation for
the newly installed or modified product.

EXAMPLE 1

C:\PS>install-msiproduct .\example.msi NOBLOCK=1

Installs the example.msi product package passing the ficticious


NOBLOCK=1 property.

EXAMPLE 2

C:\PS>get-msiproductinfo -name TEST | install-msiproduct


ADDLOCAL=Addin -log $env:TEMP\install.log

Modifies the existing product with ProductName TEST to add the


"Addin" feature locally and log to the TEMP directory.

RELATED LINKS
Install-MSIPatch
Repair-MSIProduct
Uninstall-MSIPatch
Uninstall-MSIProduct
Measure-MSIProduct
SYNOPSIS
Gets drive costs for components that would be installed to any drive.

SYNTAX
Measure-MSIProduct [-Path] <string[]> [-Destination <String>] [-Patch
<string[]>] [-Properties <string[]>] [-Transform <string[]>]
[<CommonParameters>]

Measure-MSIProduct [-Destination <String>] -LiteralPath <string[]> [-


Patch <string[]>] [-Properties <string[]>] [-Transform <string[]>]
[<CommonParameters>]

DESCRIPTION
You can use this command to get the costs for components that will be
installed to any drive mounted to the system. If multiple product
packages
are specified the total costs for all components in all specified
products are returned.

PARAMETERS
-Destination [<String>]
The target directory where the product should be installed.

Note that the product package must be authored to support


installing to TARGETDIR.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-LiteralPath <string[]>
The path to a product package to measure. The value of -
LiteralPath is used exactly as typed. No characters are interpreted as
wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Patch [<string[]>]
The path to a patch package or packages to apply to the product
package before measuring. Patches are applied in sequence order.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Path <string[]>
The path to a product package to measure. Wildcards are
permitted. You can specify * in any part of the path to select all
matching files.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Properties [<string[]>]
Additional properties to pass to the session.

Note that you can mark all features for installation using
ADDLOCAL=ALL or set public directories using this parameter.

Required? false
Position? named
Default value
Accept pipeline input? true (FromRemainingArguments)
Accept wildcard characters? false

-Transform [<string[]>]
The path to a transform or transforms to apply to the product
package before measuring.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS

OUTPUTS
System.Management.Automation.PSDriveInfoA PSDriveInfo object with
MSISpaceRequired and MSITemporarySpaceRequired properties attached
(measured in bytes).

EXAMPLE 1

C:\PS>measure-msiproduct .\example.msi -patch .\example.msp -target


X:\Example

Gets the drive costs for example.msi with example.msp applied if


installed to the X:\Example directory.

RELATED LINKS
Remove-MSILoggingPolicy
SYNOPSIS
Removes the Windows Installer logging policy.

SYNTAX
Remove-MSILoggingPolicy [<CommonParameters>]

DESCRIPTION
The Windows Installer logging policy determines whether logs are
generated by default and how much information they contain. This cmdlet
removes
the current logging and debug policies.

PARAMETERS
INPUTS

OUTPUTS

RELATED LINKS
Get-MSILoggingPolicy
Set-MSILoggingPolicy
Remove-MSISource
SYNOPSIS
Removes a registered network source or URL from a product or patch.

SYNTAX
Remove-MSISource [-ProductCode] <String> -LiteralPath <string[]> [-
PassThru] [-PatchCode <String>] [-UserContext
<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid
<String>] [<CommonParameters>]

Remove-MSISource [-ProductCode] <String> [-Path] <string[]> [-


PassThru] [-PatchCode <String>] [-UserContext
<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid
<String>] [<CommonParameters>]

DESCRIPTION
Windows Installer products and patches can have zero or more
registered locations that direct Windows Installer where to look for
package source.
This cmdlet will remove a location registered to a product or patch
and optionally return the remaining locations through the pipeline.

PARAMETERS
-LiteralPath <string[]>
The directory or URL to unregister. The value of -LiteralPath is
used exactly as typed. No characters are interpreted as wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-PassThru
Whether to return the remaining registered source through the
pipeline.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-PatchCode [<String>]
The patch code for a patch.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Path <string[]>
The directory or URL to unregister. Wildcards are permitted. You
can specify * in any part of the path to select all matching files.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

-ProductCode <String>
The ProductCode for a product or applied patch.

Required? true
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-UserContext [<Microsoft.Deployment.WindowsInstaller.UserContexts>]
The user context for a product or patch.

Required? false
Position? named
Default value All
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-UserSid [<String>]
The user SID for a product or patch.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
OUTPUTS
Microsoft.Tools.WindowsInstaller.SourceInfoSource information for
an installed product.

Microsoft.Tools.WindowsInstaller.PatchSourceInfoSource
information for an applied patch.

EXAMPLE 1

C:\PS>remove-msisource '{707ABAE4-4DC5-478C-9D36-7CC5C1A85A3C}'
'C:\Package Cache\'

Removes the C:\Package Cache source location from the specified


product.

RELATED LINKS
Add-MSISource
Clear-MSISource
Get-MSISource
Repair-MSIProduct
SYNOPSIS
Repairs or modifies a product package.

SYNTAX
Repair-MSIProduct [-Path] <string[]> [-Chain] [-Force] [-Log
<String>] [-PassThru] [-Properties <string[]>] [-ReinstallMode
<Microsoft.Deployment.WindowsInstaller.ReinstallModes>] [-
ResultVariable <String>] [<CommonParameters>]

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


Product <Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
[-Properties <string[]>] [-ReinstallMode
<Microsoft.Deployment.WindowsInstaller.ReinstallModes>] [-ResultVariable
<String>] [<CommonParameters>]

Repair-MSIProduct [-Chain] [-Force] -LiteralPath <string[]> [-Log


<String>] [-PassThru] [-Properties <string[]>] [-ReinstallMode
<Microsoft.Deployment.WindowsInstaller.ReinstallModes>] [-
ResultVariable <String>] [<CommonParameters>]

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


ProductCode <string[]> [-Properties <string[]>] [-ReinstallMode
<Microsoft.Deployment.WindowsInstaller.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
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
Accept pipeline input? false
Accept wildcard characters? false

-Force
Whether to suppress all prompts.

Required? false
Position? named
Default value
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
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
Accept pipeline input? false
Accept wildcard characters? false

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

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

-Product
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
An existing product to repair or modify.

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

-ReinstallMode
[<Microsoft.Deployment.WindowsInstaller.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
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationThe
product to repair or modify.

OUTPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationInformation for
the newly repaired product.

EXAMPLE 1

C:\PS>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

C:\PS>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
Set-MSILoggingPolicy
SYNOPSIS
Sets the Windows Installer logging policy.

SYNTAX
Set-MSILoggingPolicy [-LoggingPolicy]
<Microsoft.Tools.WindowsInstaller.LoggingPolicies> [-PassThru] [-Raw]
[<CommonParameters>]

DESCRIPTION
The Windows Installer logging policy determines whether logs are
generated by default and how much information they contain. This cmdlet
sets the
logging policy and can return the logging modes as a collection of
strings or the raw string value from the registry if -passthru is
specified.

PARAMETERS
-LoggingPolicy <Microsoft.Tools.WindowsInstaller.LoggingPolicies>
The logging mode to set in the registry. If "ExtraDebug" or "x"
are set, the Debug policy is also set to 7; however, if neither are set
the
current Debug policy is not removed.

This can be a combination of "None", "ActionData", "ActionStart",


"CommonData", "Error", "ExtraDebug", "FatalExit", "Information",
"OutOfDiskSpace", "PropertyDump", "User", "Verbose", "Warning",
"All", and "FlushEachLine"; or you can specify the Windows Installer
command
line options consisting of any combination of the characters
"voicewarmupx!".

Note that "All" does not include "FlushEachLine", but is


equivalent to "voicewarmupx".

Required? true
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false

-PassThru
Returns the logging modes set in the registry.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Raw
Along with -passthru, returns the raw string value from the
registry.

Required? false
Position? named
Default value
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
stringIf -passthru and -raw are specified and a logging policy
set, the raw registry value is returned.

string[]If -passthru is specified, the default output type


consisting of zero or more logging modes that are set in the registry.

RELATED LINKS
Get-MSILoggingPolicy
Remove-MSILoggingPolicy
Test-MSIProduct
SYNOPSIS
Runs internal consistency evaluators (ICEs) against the product
package or packages.

SYNTAX
Test-MSIProduct [-Path] <string[]> [-AdditionalCube <string[]>] [-
Exclude <string[]>] [-Include <string[]>] [-NoDefault] [-Patch
<string[]>]
[-Transform <string[]>] [<CommonParameters>]

Test-MSIProduct [-AdditionalCube <string[]>] [-Exclude <string[]>] [-


Include <string[]>] -LiteralPath <string[]> [-NoDefault] [-Patch
<string[]>]
[-Transform <string[]>] [<CommonParameters>]

DESCRIPTION
Internal consistency evaluators (ICEs) are custom actions that
validate whether a product is authored as specified. If Orca or MsiVal2
is
installed, the default ICE .cub ("ICE cube") file is used by default,
and you can specify custom ICE cube.

You can also apply any number of patches or transforms before running
ICEs. This allows you to evaluate a product that is transformed by, for
example, a patch to also make sure the changes made by a patch or
valid.

PARAMETERS
-AdditionalCube [<string[]>]
One or more ICE .cub files to use for evaluation.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Exclude [<string[]>]
The names of ICEs to exclude from evaluation (all other ICEs are
included).

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Include [<string[]>]
The names of ICEs to include from evaluation (all other ICEs are
excluded).

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-LiteralPath <string[]>
The path to a package to evaluate. The value of -LiteralPath is
used exactly as typed. No characters are interpreted as wildcards.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-NoDefault
Do not import darice.cub if installed with Orca or MsiVal2.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Patch [<string[]>]
The path to a patch package or packages to apply to the product
package before evaluation. Patches are applied in sequence order.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Path <string[]>
The path to a package to evaluate. Wildcards are permitted. You
can specify * in any part of the path to select all matching files.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

-Transform [<string[]>]
The path to a transform or transforms to apply to the product
package before evaluation.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Tools.WindowsInstaller.IceMessageInformation generated
from each ICE. Specifying -Verbose will show additional information from
each ICE.

EXAMPLE 1

C:\PS>test-msiproduct .\example.msi -include ICE0* -exclude ICE03 -v

Output all messages from ICEs 01 through 09 except for ICE03.

EXAMPLE 2

C:\PS>test-msiproduct .\example.msi -patch .\example.msp -add


.\tests\custom.cub

Apply example.msp to example.msi, then run all the default and custom
ICEs.

RELATED LINKS
Uninstall-MSIPatch
SYNOPSIS
Installs a patch package or packages for all or only specified
products.

SYNTAX
Uninstall-MSIPatch [-Path] <string[]> [-Chain] [-Force] [-Log
<String>] [-ProductCode <string[]>] [-Properties <string[]>] [-
ResultVariable
<String>] [-UserContext
<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid <String>]
[<CommonParameters>]

Uninstall-MSIPatch [-Chain] [-Force] [-Log <String>] -Patch


<Microsoft.Deployment.WindowsInstaller.PatchInstallation[]> [-ProductCode
<string[]>]
[-Properties <string[]>] [-ResultVariable <String>] [-UserContext
<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid <String>]
[<CommonParameters>]

Uninstall-MSIPatch [-Chain] [-Force] -LiteralPath <string[]> [-Log


<String>] [-ProductCode <string[]>] [-Properties <string[]>] [-
ResultVariable
<String>] [-UserContext
<Microsoft.Deployment.WindowsInstaller.UserContexts>] [-UserSid <String>]
[<CommonParameters>]

DESCRIPTION
Uninstalls one or more packages from all products which they're
applied or only from the specified set of products based on their
ProductCode.

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

PARAMETERS
-Chain
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
Accept pipeline input? false
Accept wildcard characters? false

-Force
Whether to suppress all prompts.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-LiteralPath <string[]>
The path to a patch package to uninstall. The value of -
LiteralPath is used exactly as typed. No characters are interpreted as
wildcards.

Required? true
Position? named
Default value
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
Accept pipeline input? false
Accept wildcard characters? false

-Patch <Microsoft.Deployment.WindowsInstaller.PatchInstallation[]>
Information about a patch or patches to uninstall.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-Path <string[]>
The path to a patch 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
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? true

-ProductCode [<string[]>]
The ProductCode or ProductCodes from which patches are removed.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Properties [<string[]>]
Additional property=value pairs to pass during uninstall.

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

-UserContext [<Microsoft.Deployment.WindowsInstaller.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
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
(http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS

OUTPUTS

EXAMPLE 1

C:\PS>get-msiproductifo -name TEST | get-msipatchinfo | uninstall-


msipatch -log $env:TEMP\unpatch.log

Uninstalls all patches applied to the product with ProductName TEST


and logs to the TEMP directory.

RELATED LINKS
Install-MSIPatch
Uninstall-MSIProduct
SYNOPSIS
Uninstalls a product package or packages, or an existing product on
the machine.

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

Uninstall-MSIProduct [-Chain] [-Force] [-Log <String>] -Product


<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]> [-
Properties
<string[]>] [-ResultVariable <String>] [<CommonParameters>]

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


<String>] [-Properties <string[]>] [-ResultVariable <String>]
[<CommonParameters>]

Uninstall-MSIProduct [-Chain] [-Force] [-Log <String>] -ProductCode


<string[]> [-Properties <string[]>] [-ResultVariable <String>]
[<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
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
Accept pipeline input? false
Accept wildcard characters? false
-Force
Whether to suppress all prompts.

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

-Product
<Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>
The product to uninstall.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-ProductCode <string[]>
The ProductCode of a product to uninstall.
Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Properties [<string[]>]
Additional property=value pairs to pass during uninstall.

Required? false
Position? named
Default value
Accept pipeline input? true (FromRemainingArguments)
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
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
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
Microsoft.Deployment.WindowsInstaller.ProductInstallationThe
product to uninstall.

OUTPUTS
EXAMPLE 1

C:\PS>uninstall-msiproduct .\example.msi -log $env:TEMP\uninstall.log

Uninstall the example.msi product package and log to the TEMP


directory.

EXAMPLE 2

C:\PS>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
Install-MSIProduct
Repair-MSIProduct

S-ar putea să vă placă și