Edit

Share via


Remove-AppxVolume

Removes an appx volume.

Syntax

Default (Default)

Remove-AppxVolume
    [-Volume] <AppxVolume[]>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-AppxVolume cmdlet removes an AppxVolume. You can only remove a volume after there are no apps staged to it for any user. After you remove a volume, apps can no longer be added to it.

Examples

Example 1: Remove a volume by using an ID

Remove-AppxVolume -Volume {984786d3-0cae-49de-a68f-8bedb0ca260b}

This command removes a volume that has the specified media ID.

Example 2: Remove a volume by using a path

Remove-AppxVolume -Volume E:\

This command removes a volume at the path E:\.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Volume

Specifies the AppxVolume object to remove.

Parameter properties

Type:

AppxVolume[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet isn't run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.