Azure StorSimple 関連の PowerShell コマンドレット (Set-AzureStorSimpleVirtualDevice) について

ブログ エントリ内にアフィリエイト広告が含まれています
スポンサーリンク

StorSimple は、Microsoft 社が提供するハイブリッドのクラウド ストレージ サービスです。 Microsoft Azure と組み合わせることで、Azure ストレージを拡張領域として利用することが可能であり、また別拠点でのデータ復旧が可能であることから、効率的なデータ管理、災害対策が実現できます。

Azure StorSimple デバイスの管理に使用することが可能な PowerShell コマンドレットが提供されており、設定方法について MSDN サイト上で公開されていますが、PowerShell コマンドレットのヘルプについては英語のみであり、日本語による情報はほとんど公開されていません。

Azure StorSimple 関連の PowerShell コマンドレットの 1 つである「Set-AzureStorSimpleVirtualDevice」について、本ブログにて日本語の情報として纏めてみました((他の PowerShell コマンドレットについては、「Azure StorSimple 関連の PowerShell コマンドレットについて」を参照) (Windows Azure PowerShell バージョン 0.9.7 で確認しているものとなります)。

■名前

Set-AzureStorSimpleVirtualDevice

■概要

StorSimple 仮想デバイスのデバイス構成を作成、もしくは更新します。

■構文

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

■説明

Set-AzureStorSimpleVirtualDevice コマンドレットは、Azure StorSimple 仮想デバイスのデバイス構成を作成、もしくは更新します。

■パラメーター

-AdministratorPassword <System.String>
構成する仮想デバイスの管理者パスワードを指定します。

必須 true
位置 3
既定値 なし
パイプライン入力を許可する false
ワイルドカード文字を許可する false

-DeviceName <String>
構成する仮想デバイス名を指定します。

必須 true
位置 1
既定値 なし
パイプライン入力を許可する false
ワイルドカード文字を許可する false

-Profile [<AzureProfile>]
Azure プロファイルを指定します。

必須 false
位置 named
既定値 なし
パイプライン入力を許可する false
ワイルドカード文字を許可する false

-SecretKey <String>
仮想デバイスのサービス暗号化キーを指定します。このキーは、最初の物理デバイスがリソースに登録されたときに生成されます。

必須 true
位置 2
既定値 なし
パイプライン入力を許可する false
ワイルドカード文字を許可する false

-SnapshotManagerPassword <System.String>
スナップショット マネージャー パスワードを指定します。

必須 true
位置 4
既定値 なし
パイプライン入力を許可する false
ワイルドカード文字を許可する false

-TimeZone [<TimeZoneInfo>]
デバイスに対するタイム ゾーンを指定します。GetSystemTimeZone() メソッドを用いて TimeZoneInfo オブジェクトを作成することが可能です。例として、このコマンドは太平洋標準時に対するタイム ゾーン情報オブジェクトを作成します: [System.TimeZoneInfo]::GetSystemTimeZones() | where { $_.Id -eq “Pacific Standard Time” }

必須 false
位置 5
既定値 なし
パイプライン入力を許可する true(ByValue)
ワイルドカード文字を許可する false

<CommonParameters>
このコマンドレットは、次の共通パラメーターをサポートします: –Verbose、-Debug、-ErrorAction-ErrorVariable、-WarningAction、-WarningVariable、-OutBuffer、-PipelineVariable、および -OutVariable。詳細については、about_CommonParameters を参照してください。

■入力

  • TimeZoneInfo
    このコマンドレットに TimeZoneInfo オブジェクトをパイプすることが可能です。

■出力

  • DeviceJobDetails
    このコマンドレットは、仮想デバイスに対する更新されたデバイスの詳細を返します。

■メモ

  • 詳細については、「Get-Help Set-AzureStorSimpleVirtualDevice -detailed」と入力してください。
  • 技術情報については、「Get-Help Set-AzureStorSimpleVirtualDevice -full」と入力してください。

■エイリアス

  • なし

■例

例 1: 仮想デバイスの更新

$TimeZoneInfo = [System.TimeZoneInfo]::GetSystemTimeZones() | where { $_.Id -eq "Pacific Standard Time" }
Set-AzureStorSimpleVirtualDevice -DeviceName "Contoso23" -SecretKey "wcZBlBGpCMf4USdSKyt/SQ==" -TimeZone $TimeZoneInfo<br>
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

1 番目のコマンドは、太平洋標準時を取得するために System.TimeZoneInfo .NET クラスおよび標準構文を用いて、変数 $TimeZoneInfo にオブジェクトを格納します。

2 番目のコマンドは、$TimeZoneInfo 内で指定されたタイム ゾーンを使用するためにデバイス名「Contoso23」を更新します。コマンドは仮想デバイス構成にアクセスするために秘密キーを要求します。

例 2: パイプライン操作を用いた仮想デバイスの更新

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

このコマンドは、作成するタイム ゾーンを用いてデバイス名「Contoso23」を更新します。コマンドは、仮想デバイス構成にアクセスするために秘密キーを要求します。このコマンドは、売プライン操作を用いて現在のコマンドレットへタイム ゾーンを渡すことを除いて、例 1 として同じ方法で動作します。

■関連するトピック

  • New-AzureStorSimpleVirtualDevice
  • Set-AzureStorSimpleDevice

[参考]

タイトルとURLをコピーしました