共用方式為


Remove-AzureStorSimpleDeviceVolume

從 StorSimple 裝置移除磁碟區。

注意

本文件中參考的 Cmdlet 用於管理使用 Azure Service Manager(ASM) API 的舊版 Azure 資源。 建立新的資源時,不建議使用此舊版 PowerShell 模組,因為 ASM 已排定淘汰。 如需詳細資訊,請參閱 Azure Service Manager 淘汰

Az PowerShell 模組是使用 PowerShell 管理 Azure Resource Manager (ARM) 資源的建議 PowerShell 模組。

語法

Remove-AzureStorSimpleDeviceVolume
      -DeviceName <String>
      -VolumeName <String>
      [-WaitForComplete]
      [-Force]
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]
Remove-AzureStorSimpleDeviceVolume
      -DeviceName <String>
      -Volume <VirtualDisk>
      [-WaitForComplete]
      [-Force]
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]

Description

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 物件。