< Back
Install-CMsi
Post
NAME Install-CMsi
SYNOPSIS
Installs software from an MSI file.
SYNTAX
Install-CMsi [-Path] <String[]> [-Quiet] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
`Install-CMsi` installs software from an MSI file. If the install fails, it writes an error. Installation is
always done in quiet mode, i.e. you won't see any UI.
In Carbon 1.9 and earlier, this function was called `Invoke-WindowsInstaller`.
Beginning with Carbon 2.0, `Install-CMsi` only runs the MSI if the software isn't installed. Use the `-Force`
switch to always run the installer.
PARAMETERS
-Path <String[]>
The path to the installer to run. Wildcards supported.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Quiet [<SwitchParameter>]
OBSOLETE. Installers are run in quiet mode by default. This switch will be removed in a future major version
of Carbon.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Install the MSI even if it has already been installed. Will cause a repair/reinstall to run.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Install-CMsi -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 --------------------------
PS C:\\>Get-ChildItem *.msi | Install-CMsi
Demonstrates how to pipe MSI files into `Install-CMsi` for installation.
RELATED LINKS
SYNOPSIS
Installs software from an MSI file.
SYNTAX
Install-CMsi [-Path] <String[]> [-Quiet] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
`Install-CMsi` installs software from an MSI file. If the install fails, it writes an error. Installation is
always done in quiet mode, i.e. you won't see any UI.
In Carbon 1.9 and earlier, this function was called `Invoke-WindowsInstaller`.
Beginning with Carbon 2.0, `Install-CMsi` only runs the MSI if the software isn't installed. Use the `-Force`
switch to always run the installer.
PARAMETERS
-Path <String[]>
The path to the installer to run. Wildcards supported.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Quiet [<SwitchParameter>]
OBSOLETE. Installers are run in quiet mode by default. This switch will be removed in a future major version
of Carbon.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Install the MSI even if it has already been installed. Will cause a repair/reinstall to run.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Install-CMsi -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 --------------------------
PS C:\\>Get-ChildItem *.msi | Install-CMsi
Demonstrates how to pipe MSI files into `Install-CMsi` for installation.
RELATED LINKS