你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Remove-AzureStorSimpleDeviceVolumeContainer

从 StorSimple 设备中删除卷容器。

注意

本文档中引用的 cmdlet 用于管理使用 Azure Service Manager (ASM) API 的旧 Azure 资源。 创建新的资源时,不建议使用此旧版 PowerShell 模块,因为 ASM 计划停用。 有关详细信息,请参阅 Azure Service Manager 停用

Az PowerShell 模块是推荐的 PowerShell 模块,用于使用 PowerShell 管理 Azure 资源管理器 (ARM) 资源。

语法

Remove-AzureStorSimpleDeviceVolumeContainer
      -DeviceName <String>
      -VolumeContainer <DataContainer>
      [-WaitForComplete]
      [-Force]
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]

说明

Remove-AzureStorSimpleDeviceVolumeContainer cmdlet 从 StorSimple 设备中删除卷容器对象。 除非指定 Force 参数,否则此 cmdlet 会提示你进行确认。

示例

示例 1:使用管道删除容器

PS C:\>Get-AzureStorSimpleDeviceVolumeContainer -DeviceName "Contoso63-AppVm" -VolumeContainerName "Container08" | Remove-AzureStorSimpleDeviceVolumeContainer -DeviceName "Contoso63-AppVm" -Force
VERBOSE: ClientRequestId: 0efbb4fc-ceb0-4311-bc49-0e08161d0a37_PS
VERBOSE: ClientRequestId: bf5b615f-47e3-4868-91b6-f2d12217a302_PS
VERBOSE: ClientRequestId: 5590c87e-0602-4197-b6c3-cf58b0e7a7b3_PS
VERBOSE: ClientRequestId: b33c71ac-c345-44ff-8213-d7fdf9f8480a_PS
VERBOSE: ClientRequestId: 903d42ef-58f4-4e89-ba7f-5f234262356d_PS
VERBOSE: About to create a job to remove your Volume container! 
VERBOSE: ClientRequestId: 2279575f-5115-4344-9c6f-9ef599bd203e_PS
e9ddec89-67ac-4e2e-a2ed-820de3547bb0
VERBOSE: The delete task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
e9ddec89-67ac-4e2e-a2ed-820de3547bb0 for tracking the task's status
VERBOSE: Volume container with name: Container08 is found.

此命令使用 Get-AzureStorSimpleDeviceVolumeContainer cmdlet 在名为 Contoso63-AppVm 的设备上获取名为 Container08 的卷容器。 此命令使用管道运算符将卷容器传递到当前 cmdlet。 此命令启动任务以删除容器,然后返回 TaskResponse 对象。 若要查看任务的状态,请使用 Get-AzureStorSimpleTask cmdlet。 此命令指定 Force 参数,因此不会提示你进行确认。

参数

-DeviceName

指定要删除的卷容器所在的 StorSimple 设备的名称。

类型:String
Position:Named
默认值:None
必需:True
Accept pipeline input:False
Accept wildcard characters:False

-Force

指示此 cmdlet 不会提示你进行确认。

类型:SwitchParameter
Position:Named
默认值:None
必需:False
Accept pipeline input:False
Accept wildcard characters:False

-Profile

指定 Azure 配置文件。

类型:AzureSMProfile
Position:Named
默认值:None
必需:False
Accept pipeline input:False
Accept wildcard characters:False

-VolumeContainer

指定要删除的卷容器作为 DataContainer 对象。 若要获取 DataContainer 对象,请使用 Get-AzureStorSimpleDeviceVolumeContainer cmdlet。

类型:DataContainer
Position:Named
默认值:None
必需:True
Accept pipeline input:True
Accept wildcard characters:False

-WaitForComplete

指示此 cmdlet 等待操作完成,然后再将控制权返回到 Windows PowerShell 控制台。

类型:SwitchParameter
Position:Named
默认值:None
必需:False
Accept pipeline input:False
Accept wildcard characters:False

输入

DataContainer

此 cmdlet 接受要删除的 DataContainer 对象。

输出

TaskStatusInfo

如果指定 WaitForComplete 参数,此 cmdlet 将返回 TaskStatusInfo 对象。