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

Set-AzureStorSimpleDeviceVolume

更新现有卷的属性。

注意

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

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

语法

Set-AzureStorSimpleDeviceVolume
   -DeviceName <String>
   -VolumeName <String>
   [-Online <Boolean>]
   [-VolumeSizeInBytes <Int64>]
   [-VolumeAppType <AppType>]
   [-AccessControlRecords <System.Collections.Generic.List`1[Microsoft.WindowsAzure.Management.StorSimple.Models.AccessControlRecord]>]
   [-WaitForComplete]
   [-NewName <String>]
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]
Set-AzureStorSimpleDeviceVolume
   -DeviceName <String>
   -Volume <VirtualDisk>
   [-Online <Boolean>]
   [-VolumeSizeInBytes <Int64>]
   [-VolumeAppType <AppType>]
   [-AccessControlRecords <System.Collections.Generic.List`1[Microsoft.WindowsAzure.Management.StorSimple.Models.AccessControlRecord]>]
   [-WaitForComplete]
   [-NewName <String>]
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

说明

Set-AzureStorSimpleDeviceVolume cmdlet 更新现有卷的属性。 此 cmdlet 将卷与一个或多个访问控制记录相关联。 若要获取 AccessControlRecord 对象,请使用 Get-AzureStorSimpleAccessControlRecord cmdlet。 更新卷的大小或类型。 此外,请更新是否联机创建卷。

示例

示例 1:更新卷的联机值

PS C:\>Set-AzureStorSimpleDeviceVolume -DeviceName "Contoso63-AppVm" -VolumeName "Volume18" -Online $False
VERBOSE: ClientRequestId: f2869570-ea47-4be7-801e-9c0f22f2600d_PS
VERBOSE: ClientRequestId: c70bb86a-51d3-4390-be17-4d0847641dc3_PS
VERBOSE: ClientRequestId: d20cb5b2-6b3c-4e06-af99-cada28c5e50a_PS
VERBOSE: ClientRequestId: ab6d533e-b55b-4cfb-9c58-9153295e0547_PS
de7000f1-29c7-4102-a375-b52432f9e67e
VERBOSE: The update task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
de7000f1-29c7-4102-a375-b52432f9e67e for tracking the task's status

此命令将名为 Volume18 的卷更新为$False联机值。 此命令启动任务,然后返回 TaskResponse 对象。 若要查看任务的状态,请使用 Get-AzureStorSimpleTask cmdlet。

示例 2:修改联机值和类型

PS C:\>Set-AzureStorSimpleDeviceVolume -DeviceName "Contoso63-AppVm" -VolumeName "Volume18" -Online $True -VolumeAppType ArchiveVolume 
VERBOSE: ClientRequestId: af42b02a-645e-4801-a2d7-4197511c68cf_PS
VERBOSE: ClientRequestId: 7cb4f3b4-548e-42dc-a38c-0df0911c5206_PS
VERBOSE: ClientRequestId: 7cc706ad-a58f-4939-8e78-cabae8379a51_PS
VERBOSE: ClientRequestId: 6bed21d5-12fc-4a12-a89c-120bdb5636b1_PS
aa977225-af78-4c93-b754-72704afc928f
VERBOSE: The update task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
aa977225-af78-4c93-b754-72704afc928f for tracking the task's status

此命令更新名为 Volume18 的卷。 它修改类型并将 Online 参数的值更改为$True。

参数

-AccessControlRecords

指定要与卷关联的访问控制记录的列表。

类型:List<T>[AccessControlRecord]
Position:Named
默认值:None
必需:False
Accept pipeline input:True
Accept wildcard characters:False

-DeviceName

指定要在其中更新卷的 StorSimple 设备的名称。

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

-InformationAction

指定此 cmdlet 如何响应信息事件。

此参数的可接受值为:

  • 继续
  • 忽略
  • 询问
  • SilentlyContinue
  • 停止
  • Suspend
类型:ActionPreference
Aliases:infa
Position:Named
默认值:None
必需:False
Accept pipeline input:False
Accept wildcard characters:False

-InformationVariable

指定信息变量。

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

-NewName

指定 StorSimple 设备的新名称。

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

-Online

指定卷是否处于联机状态。

类型:Boolean
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

-Volume

指定要更新的卷的名称。

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

-VolumeAppType

指定是将卷更新为主卷还是存档卷。 有效值为:PrimaryVolume 和 ArchiveVolume。

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

-VolumeName

指定要更新的卷的名称。

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

-VolumeSizeInBytes

指定卷的更新大小(以字节为单位)。

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

-WaitForComplete

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

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

输入

List\<AccessControlRecord\>

此 cmdlet 接受要关联到卷的 AccessControlRecord 对象列表。

输出

TaskStatusInfo

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