This is the built-in help made by Microsoft for the command 'Remove-WindowsPackage', in PowerShell version 4 - as retrieved from
Windows version 'Microsoft Windows 8.1 Enterprise' 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.
Removes a package from a Windows image.
Remove-WindowsPackage [-LogLevel <LogLevel>] [-LogPath <String>] [-NoRestart] [-PackageName <String>] [-PackagePath <String>] [-ScratchDirectory <String>] [-SystemDri
ve <String>] [-WindowsDirectory <String>] -Online [<CommonParameters>]
Remove-WindowsPackage [-LogLevel <LogLevel>] [-LogPath <String>] [-NoRestart] [-PackageName <String>] [-PackagePath <String>] [-ScratchDirectory <String>] [-SystemDri
ve <String>] [-WindowsDirectory <String>] -Path <String> [<CommonParameters>]
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 fi
les.
Using this command to remove a package from an offline image will not reduce the image size.
<
Online Version: http://go.microsoft.com/fwlink/p/?linkid=289363
Get-WindowsPackage
Add-WindowsPackage
Disable-WindowsOptionalFeature
<
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.