共用方式為


Set-AzureStorSimpleVirtualDevice

建立或更新 StorSimple 虛擬裝置的裝置組態。

注意

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

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

語法

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

Description

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
接受管線輸入:False
接受萬用字元:False

-DeviceName

指定要設定的虛擬設備名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Profile

指定 Azure 設定檔。

類型:AzureSMProfile
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SecretKey

指定虛擬設備的服務加密金鑰。 當第一個實體裝置向資源註冊時,就會產生此密鑰。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-SnapshotManagerPassword

指定快照集管理員密碼。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-TimeZone

指定裝置的時區。 您可以使用 GetSystemTimeZone() 方法來建立 TimeZoneInfo 物件。 例如,此命令會建立太平洋標準時間的時區信息物件: \[System.TimeZoneInfo\]::GetSystemTimeZones() | where { $_.Id -eq "Pacific Standard Time" }

類型:TimeZoneInfo
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

輸入

TimeZoneInfo

您可以使用管線將 TimeZoneInfo 物件傳送至此 Cmdlet。

輸出

DeviceJobDetails

此 Cmdlet 會傳回虛擬設備更新的裝置詳細數據。