Uninstall-ProvisioningPackage

Uninstalls .PPKG package from the local machine.

Syntax

Uninstall-ProvisioningPackage
         [-PackageId] <String>
         [-LogsDirectoryPath <String>]
         [-WprpFile <String>]
         [-ConnectedDevice]
Uninstall-ProvisioningPackage
         -PackagePath <String>
         [-LogsDirectoryPath <String>]
         [-WprpFile <String>]
         [-ConnectedDevice]
Uninstall-ProvisioningPackage
         [-AllInstalledPackages]
         [-LogsDirectoryPath <String>]
         [-WprpFile <String>]
         [-ConnectedDevice]
Uninstall-ProvisioningPackage
         [-RuntimeMetadata] <RuntimeProvPackageMetadata>
         [-LogsDirectoryPath <String>]
         [-WprpFile <String>]
         [-ConnectedDevice]

Description

Unintalls .PPKG package based on package ID, path, metadata, or all packages.

The Uninstall-ProvisioningPackage cmdlet is supported on Windows 11 client operating system only.

Examples

Example 1: Uninstall all provisioning packages

PS C:\> Uninstall-ProvisioningPackage -AllInstalledPackages

Uninstalls all provisioning packages.

Parameters

-AllInstalledPackages

Removes all installed packages.

Type:SwitchParameter
Aliases:All
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ConnectedDevice

If enabled, specifies that the device type is mobile.

Type:SwitchParameter
Aliases:Device
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LogsDirectoryPath

Specifies the logs directory path.

Type:String
Aliases:Logs
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PackageId

Specifies the ID of a package.

Type:String
Aliases:Id
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PackagePath

Specifies the package path.

Type:String
Aliases:Path
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RuntimeMetadata

Specifies a runtime provisioning package metadata object.

Type:RuntimeProvPackageMetadata
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WprpFile

Specifies the location of the WPR profile file.

Type:String
Aliases:Wprp
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Windows.Provisioning.ProvCommon.RuntimeProvPackageMetadata

Outputs

Object