Set-AzureStorSimpleVirtualDevice
建立或更新 StorSimple 虛擬裝置的裝置組態。
注意
本檔中參考的 Cmdlet 用於管理使用服務管理 API 的舊版 Azure 資源。 如需管理 Azure Resource Manager 資源的 Cmdlet,請參閱 Az PowerShell 模組 。
Syntax
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
指定要設定之虛擬裝置的系統管理員密碼。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeviceName
指定要設定的虛擬裝置名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
指定 Azure 設定檔。
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SecretKey
指定虛擬裝置的服務加密金鑰。 當第一個實體裝置向資源註冊時,就會產生此金鑰。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SnapshotManagerPassword
指定快照集管理員密碼。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TimeZone
指定裝置的時區。
您可以使用 GetSystemTimeZone() 方法來建立 TimeZoneInfo 物件 。
例如,此命令會建立太平洋標準時間的時區資訊物件: \[System.TimeZoneInfo\]::GetSystemTimeZones() | where { $_.Id -eq "Pacific Standard Time" }
Type: | TimeZoneInfo |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
輸入
TimeZoneInfo
您可以使用管線將 TimeZoneInfo 物件傳送至此 Cmdlet。
輸出
DeviceJobDetails
此 Cmdlet 會傳回虛擬裝置更新的裝置詳細資料。