Get-AzureSiteRecoveryProtectionEntity
Site Recovery コンテナー内の保護可能なエンティティまたは保護されたエンティティを取得します。
注意
このドキュメントで参照されているコマンドレットは、Service Management API を使用するレガシ Azure リソースを管理するためのものです。 Azure Resource Manager リソースを管理するためのコマンドレットについては、Az PowerShell モジュールを参照してください。
構文
Get-AzureSiteRecoveryProtectionEntity
-ProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-Id <String>
-ProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-Id <String>
-ProtectionContainerId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-Name <String>
-ProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-Name <String>
-ProtectionContainerId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-ProtectionContainerId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
説明
Get-AzureSiteRecoveryProtectionEntity コマンドレットは、現在の Azure Site Recovery コンテナー内の保護可能または保護されたエンティティ (仮想マシンなど) を取得します。
例
例 1: コンテナーに保護された仮想マシンを表示する
PS C:\> $Container = Get-AzureSiteRecoveryProtectionContainer
PS C:\> Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $Container
ID : 43aaab46-1cb0-4c39-8077-9a091c3b05ce
ServerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c
ProtectionContainerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c_1c513d45-645d-4ed0-b9ae-e7b869a1f7fc
Name : testvm
Type : VirtualMachine
FabricObjectId : 506B3CAC-5758-49E2-98C4-E5B0512E4D8E
Protected : False
CanCommit : False
CanFailover : False
CanReverseReplicate : False
ActiveLocation : Primary
ProtectionStateDescription : Enabling protection
ReplicationHealth :
TestFailoverStateDescription : Nonev
ReplicationProvider : HyperVReplica
最初のコマンドは、Get-AzureSiteRecoveryProtectionContainer コマンドレットを使用して保護されたコンテナーを取得し、そのオブジェクトを$Container変数に格納します。
2 番目のコマンドは、$Container内のコンテナーに属している保護された仮想マシンを取得し、それを表示します。
パラメーター
-Id
取得する保護エンティティの ID を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
取得する保護エンティティの名前を指定します。
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 |
-ProtectionContainer
保護コンテナーを指定します。
Type: | ASRProtectionContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ProtectionContainerId
保護されたコンテナーの ID を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |