編集

次の方法で共有


Remove-AppxVolume

Removes an appx volume.

Syntax

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.

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

-Volume

Specifies the AppxVolume object to remove.

Type:AppxVolume[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

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