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

Set-AzureStorSimpleVirtualDevice

创建或更新 StorSimple 虚拟设备的设备配置。

注意

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

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

语法

Set-AzureStorSimpleVirtualDevice
   -DeviceName <String>
   -SecretKey <String>
   -AdministratorPassword <String>
   -SnapshotManagerPassword <String>
   [-TimeZone <TimeZoneInfo>]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

说明

Set-AzureStorSimpleVirtualDevice cmdlet 创建或更新 Azure StorSimple 虚拟设备的设备配置。

示例

示例 1:更新虚拟设备

PS C:\>$TimeZoneInfo = [System.TimeZoneInfo]::GetSystemTimeZones() | where { $_.Id -eq "Pacific Standard Time" }
PS C:\> Set-AzureStorSimpleVirtualDevice -DeviceName "Contoso23" -SecretKey "wcZBlBGpCMf4USdSKyt/SQ==" -TimeZone $TimeZoneInfo
VERBOSE: ClientRequestId: e31f0d6b-451d-4c1d-b2f1-3fc84c13972c_PS
VERBOSE: ClientRequestId: df58db83-d563-4a2e-bbb4-9576f0e69ca6_PS
VERBOSE: ClientRequestId: 494a9f0d-79ee-4fde-ab4d-85ee5a357556_PS
VERBOSE: ClientRequestId: ce557cbf-174d-4301-93d4-5ffe082c8413_PS
VERBOSE: ClientRequestId: 31284dad-de2c-4758-a2ef-45962875bfa6_PS
VERBOSE: About to configure the device : win-ff93i74m1e1 ! 
VERBOSE: ClientRequestId: d9c66302-45d8-488a-adda-8ccf957f77d3_PS


TaskId       : 21f530c3-bc47-4591-8c4e-da4d694b751d
TaskResult   : Succeeded
TaskStatus   : Completed
ErrorCode    : 
ErrorMessage : 
TaskSteps    : {Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStep, Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStep}

VERBOSE: The task created for your Setup operation has completed successfully. 
VERBOSE: ClientRequestId: a94f972c-18ea-40b6-9401-2ad209c0c8b4_PS
AlertNotification              : Microsoft.WindowsAzure.Management.StorSimple.Models.AlertNotificationSettings
Chap                           : Microsoft.WindowsAzure.Management.StorSimple.Models.ChapSettings
DeviceProperties               : Microsoft.WindowsAzure.Management.StorSimple.Models.DeviceInfo
DnsServer                      : Microsoft.WindowsAzure.Management.StorSimple.Models.DnsServerSettings
InstanceId                     : d369ebb4-8b9a-47fc-9a6b-60f371e123ae
Name                           : 
NetInterfaceList               : {}
OperationInProgress            : None
RemoteMgmtSettingsInfo         : Microsoft.WindowsAzure.Management.StorSimple.Models.RemoteManagementSettings
RemoteMinishellSecretInfo      : Microsoft.WindowsAzure.Management.StorSimple.Models.RemoteMinishellSettings
SecretEncryptionCertThumbprint : 
Snapshot                       : Microsoft.WindowsAzure.Management.StorSimple.Models.SnapshotSettings
TimeServer                     : Microsoft.WindowsAzure.Management.StorSimple.Models.TimeSettings
Type                           : VirtualAppliance
VirtualApplianceProperties     : Microsoft.WindowsAzure.Management.StorSimple.Models.VirtualApplianceInfo
WebProxy                       : Microsoft.WindowsAzure.Management.StorSimple.Models.WebProxySettings

VERBOSE: Successfully updated configuration for device Contoso23 with id d369ebb4-8b9a-47fc-9a6b-60f371e123ae

第一个命令使用 System.TimeZoneInfo .NET 类和标准语法来获取太平洋标准时区,并将该对象存储在$TimeZoneInfo变量中。

第二个命令将更新名为 Contoso23 的设备,以使用$TimeZoneInfo中指定的时区。 该命令需要密钥才能访问虚拟设备配置。

示例 2:使用管道操作员更新虚拟设备

PS C:\> [System.TimeZoneInfo]::GetSystemTimeZones() | where { $_.Id -eq "Pacific Standard Time" } | Set-AzureStorSimpleVirtualDevice -DeviceName "Contoso23" -SecretKey "wcZBlBGpCMf4USdSKyt/SQ=="

此命令将更新名为 Contoso23 的设备,以使用命令创建的时区。 该命令需要密钥才能访问虚拟设备配置。 此命令的工作方式与前面的示例相同,只不过它使用管道运算符将时区传递给当前 cmdlet。

参数

-AdministratorPassword

指定要配置的虚拟设备的管理员密码。

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

-DeviceName

指定要配置的虚拟设备的名称。

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

-Profile

指定 Azure 配置文件。

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

-SecretKey

指定虚拟设备的服务加密密钥。 当第一个物理设备注册到资源时,将生成此密钥。

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

-SnapshotManagerPassword

指定快照管理器密码。

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

-TimeZone

指定设备的时区。 可以使用 GetSystemTimeZone() 方法创建 TimeZoneInfo 对象。 例如,此命令为太平洋标准时间创建时区信息对象: \[System.TimeZoneInfo\]::GetSystemTimeZones() | where { $_.Id -eq "Pacific Standard Time" }

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

输入

TimeZoneInfo

可以通过管道将 TimeZoneInfo 对象传递给此 cmdlet。

输出

DeviceJobDetails

此 cmdlet 返回虚拟设备的更新设备详细信息。