PowerShell Logo Small

Add-WindowsPackage



This is the built-in help made by Microsoft for the command 'Add-WindowsPackage', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Adds a single .cab or .msu file to a Windows image.

SYNTAX


Add-WindowsPackage [-IgnoreCheck] [-LogLevel <LogLevel>] [-LogPath <String>] [-NoRestart] [-PreventPending] [-ScratchDirectory <String>] [-SystemDrive <String>]
[-WindowsDirectory <String>] -Online -PackagePath <String> [<CommonParameters>]
Add-WindowsPackage [-IgnoreCheck] [-LogLevel <LogLevel>] [-LogPath <String>] [-NoRestart] [-PreventPending] [-ScratchDirectory <String>] [-SystemDrive <String>]
[-WindowsDirectory <String>] -PackagePath <String> -Path <String> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


Installs a specified .cab or .msu package in the image.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=289349
Get-WindowsPackage
Remove-WindowsPackage

REMARKS

<

Examples


Example 1

PS C:\>Add-WindowsPackage –Online –PackagePath c:\packages\package.cab



This command adds a .cab package to an online image.






Example 2

PS C:\>Add-WindowsPackage –Path c:\offline –PackagePath c:\packages\demo_package.msu -PreventPending



This command adds an .msu file to a mounted Windows image unless there are pending actions on the package or the image.






Example 3

PS C:\>Add-WindowsPackage –Path c:\offline –PackagePath c:\packages -IgnoreCheck



This command adds all of the packages in a folder to a mounted Windows image without checking if they are applicable to the image.