你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Remove-AzureStorSimpleDeviceVolume
从 StorSimple 设备中删除卷。
注意
本文档中引用的 cmdlet 用于管理使用 Azure Service Manager (ASM) API 的旧式 Azure 资源。 创建新资源时,建议不要使用旧的 PowerShell 模块,因为计划将停用 ASM。 有关详细信息,请参阅 Azure Service Manager 停用。
Az PowerShell 模块是建议用于管理 PowerShell 的 Azure 资源管理器 (ARM) 资源的 PowerShell 模块。
语法
Remove-AzureStorSimpleDeviceVolume
-DeviceName <String>
-VolumeName <String>
[-WaitForComplete]
[-Force]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Remove-AzureStorSimpleDeviceVolume
-DeviceName <String>
-Volume <VirtualDisk>
[-WaitForComplete]
[-Force]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
说明
Remove-AzureStorSimpleDeviceVolume cmdlet 从 StorSimple 设备中删除卷。 除非指定 Force 参数,否则此 cmdlet 会提示你进行确认。
示例
示例 1:使用管道删除卷
PS C:\>Get-AzureStorSimpleDeviceVolume -DeviceName "Contoso63-AppVm" -VolumeName "Volume18" | Remove-AzureStorSimpleDeviceVolume -DeviceName "Contoso63-AppVm"
VERBOSE: ClientRequestId: 2933e24d-9564-42b5-9053-5f0bc4f59ea8_PS
VERBOSE: ClientRequestId: 7c2d854b-537a-4253-bb0c-c15bc8aa2b49_PS
VERBOSE: ClientRequestId: 4bf749ac-517c-49e7-8027-a8f62e272014_PS
VERBOSE: ClientRequestId: 7d9ec87a-616d-4ca9-bfb8-158859174d59_PS
Confirm
Are you sure you want to remove the volume?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
VERBOSE: ClientRequestId: 67a38e28-a015-44b1-8159-c1a6604f4d81_PS
VERBOSE: About to run a job to remove your volume!
VERBOSE: ClientRequestId: 56101c10-07ca-40f4-8f19-c6fdd895e3a5_PS
32925451-4451-4478-89f7-d8930505d3fb
VERBOSE: The delete task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
32925451-4451-4478-89f7-d8930505d3fb for tracking the task's status
VERBOSE: Volume with name: Volume18 is found.
此命令在名为 Contoso63-AppVm 的设备上获取名为 Volume18 的卷,然后使用管道运算符将该卷传递到当前 cmdlet。 当前 cmdlet 启动删除卷的任务,然后返回 TaskResponse 对象。 若要查看任务的状态,请使用 Get-AzureStorSimpleTask cmdlet。 该命令未指定 Force 参数,因此 cmdlet 会提示你进行确认。
示例 2:在不确认的情况下删除卷
PS C:\>Remove-AzureStorSimpleDeviceVolume -DeviceName "Contoso63-AppVm" -VolumeName "Volume18" -Force
VERBOSE: ClientRequestId: 72f13290-41eb-4ac4-9535-da1a42d0fa0b_PS
VERBOSE: ClientRequestId: ae0c1d99-1a66-4a69-9260-f2c8c12546bd_PS
VERBOSE: ClientRequestId: 9610744f-d031-488f-87e6-3ecddb305e13_PS
VERBOSE: About to run a job to remove your volume!
VERBOSE: ClientRequestId: d33525d8-7276-4d2a-942d-d10f8078f1f7_PS
483f8cb4-ebc3-46a9-a9e6-0989e25738a0
VERBOSE: The delete task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
483f8cb4-ebc3-46a9-a9e6-0989e25738a0 for tracking the task's status
此命令从名为 Contoso63-AppVm 的设备中删除名为 Volume18 的卷。 该命令指定 Force 参数,因此 cmdlet 不会提示你进行确认。
参数
-DeviceName
指定要删除的卷所在的 StorSimple 设备的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Force
指示此 cmdlet 不会提示你进行确认。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Profile
指定 Azure 配置文件。
类型: | AzureSMProfile |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Volume
指定要删除的卷,作为 VirtualDisk 对象。 若要获取 VirtualDisk 对象,请使用 Get-AzureStorSimpleDeviceVolume cmdlet。
类型: | VirtualDisk |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-VolumeName
指定要删除的卷的名称。
类型: | String |
别名: | Name |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-WaitForComplete
指示此 cmdlet 等待操作完成,然后再将控制权返回到 Windows PowerShell 控制台。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
输入
VirtualDisk
此 cmdlet 接受 要删除的 VirtualDisk 对象或要删除的 VirtualDisk 的卷名称。
输出
TaskStatusInfo
如果指定 WaitForComplete 参数,此 cmdlet 将返回 TaskStatusInfo 对象。