Set-AzureSiteRecoveryVM
Site Recovery 保護エンティティの回復側オプションを設定します。
注意
このドキュメントで参照されているコマンドレットは、Service Management API を使用するレガシ Azure リソースを管理するためのものです。 Azure Resource Manager リソースを管理するためのコマンドレットについては、Az PowerShell モジュールを参照してください。
構文
Set-AzureSiteRecoveryVM
-VirtualMachine <ASRVirtualMachine>
[-Name <String>]
[-Size <String>]
[-PrimaryNic <String>]
[-RecoveryNetworkId <String>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
説明
Set-AzureSiteRecoveryVM コマンドレットは、Azure Site Recovery 保護エンティティに対して、復旧仮想マシンのサイズや復旧仮想マシン ネットワークなどの復旧側の保護オプションを設定します。
例
例 1: 保護された仮想マシンで更新を許可する
PS C:\> $ProtectionContainer = Get-AzureSiteRecoveryProtectionContainer
PS C:\> $VirtualMachines = Get-AzureSiteRecoveryVM -ProtectionContainer $ProtectionContainer
PS C:\> Set-AzureSiteRecoveryVM -VirtualMachine $VirtualMachines[0] -Name "NewVirtualMachine05"
Name :
ID : 8170d274-1e48-404a-b080-172ada140bc3
ClientRequestId : 09354052-8430-4fa8-9a35-63196dd4b2b4-2015-02-03 04:19:06Z-P
State : NotStarted
StateDescription : NotStarted
StartTime :
EndTime :
AllowedActions :
Tasks : {}
Errors : {}
最初のコマンドでは、 Get-AzureSiteRecoveryProtectionContainer コマンドレットを使用して保護されたコンテナーを取得し、$ProtectionContainer変数に格納します。
2 番目のコマンドは、Get-AzureSiteRecoveryVM コマンドレットを使用して仮想マシンを$ProtectionContainerに取得し、$VitrualMachines変数に格納します。
最後のコマンドでは、NewVirtualMachine05 という名前の $VitrualMachines 配列内の最初の仮想マシンを更新できます。
パラメーター
-Name
ターゲット仮想マシンの名前を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PrimaryNic
プライマリ ネットワーク アダプター カードを指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
-RecoveryNetworkId
復旧ネットワーク ID を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Size
ターゲット仮想マシンのサイズを指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualMachine
Site Recovery 仮想マシン オブジェクトを指定します。
Type: | ASRVirtualMachine |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |