Invoke-WindowsInstaller

Runs an MSI installer.

Syntax

Invoke-WindowsInstaller [-Path] <String> [-Quiet] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

There are two problems running an MSI (for MicroSoft Installer):

This function will run an MSI installer and wait for the MSI to finish. If the install process returns a non-zero exit code, an error will be written.

You can optionally run the installer in quiet mode. This hides any installer UI and installs the package with the default options.

Parameters

Name Type Description Required? Pipeline Input Default Value
Path String The installer to run. true false
Quiet SwitchParameter Runs the installer in quiet mode. false false False
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.

EXAMPLE 1

Invoke-WindowsInstaller -Path Path\to\installer.msi

Runs installer.msi, and waits untils for the installer to finish. If the installer has a UI, it is shown to the user.

EXAMPLE 2

Invoke-WindowsInstaller -Path Path\to\installer.msi -Quiet

Runs installer.msi without showing its UI (i.e. performs a silent install using the package's default options).