Remove-AppxVolume
Remove-AppxVolume is accessible with the help of Appx module. To configure Appx, go through this link.
Synopsis
Removes an appx volume.
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.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
-Volume
Specifies the AppxVolume object to remove.
| Type: | AppxVolume[] |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName, ByValue) |
| Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Syntax
Remove-AppxVolume [-Volume] <AppxVolume[]> [-WhatIf] [-Confirm] [<CommonParameters>]
——————-Example 1——————-
Remove a volume by using an ID
PS C:> Remove-AppxVolume -Volume {VolumeID}
This command removes a volume that has the specified media ID.
——————-Example 2——————-
Remove a volume by using a path
PS C:> Remove-AppxVolume -Volume D:\
This command removes a volume at the path D:.
You can check the Version, CommandType and Source of this cmdlet by giving below command.
Get-Command Remove-AppxVolume

You can also read about
- Add-AppxVolume
- Dismount-AppxVolume
- Get-AppxVolume
- Mount-AppxVolume