PowerShell Logo Small

Remove-WindowsPackage



This is the built-in help made by Microsoft for the command 'Remove-WindowsPackage', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 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

Removes a package from a Windows image.

SYNTAX


Remove-WindowsPackage [-LogLevel <LogLevel>] [-LogPath <String>] [-NoRestart [<SwitchParameter>]] [-PackageName <String>] [-PackagePath
<String>] [-ScratchDirectory <String>] [-SystemDrive <String>] [-WindowsDirectory <String>] -Online [<SwitchParameter>] [<CommonParameters>]
Remove-WindowsPackage [-LogLevel <LogLevel>] [-LogPath <String>] [-NoRestart [<SwitchParameter>]] [-PackageName <String>] [-PackagePath
<String>] [-ScratchDirectory <String>] [-SystemDrive <String>] [-WindowsDirectory <String>] -Path <String> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-WindowsPackage cmdlet removes a specified .cab file package from the image. Only .cab files can be specified. You cannot use this
command to remove .msu files.



Using this command to remove a package from an offline image will not reduce the image size.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=215288
Deployment Image Servicing and Management (DISM) Cmdlets
Get-WindowsPackage
Add-WindowsPackage
Disable-WindowsOptionalFeature

REMARKS

<

Examples


EXAMPLE 1

PS C:\> Remove-WindowsPackage –Online –PackageName Microsoft-Windows-Backup-Package~31bf3856ad364e35~x86~~6.1.7601.16525



This command removes the specified package from the running Windows operating system.




EXAMPLE 2

PS C:\> Remove-WindowsPackage –Path c:\offline –PackagePath c:\packages\package.cab



This command removes the package at c:\packages\package.cab from the Windows image that is mounted to c:\offline.