Get-AzureSiteRecoveryProtectionEntity
Obtém entidades protegíveis ou protegidas em um cofre da Recuperação de Site.
Observação
Os cmdlets mostrados nesta documentação são usados para gerenciar recursos herdados do Azure que usam APIs de Gerenciamento de Serviços. Confira o módulo Az PowerShell para usar cmdlets a fim de gerenciar recursos do Azure Resource Manager.
Syntax
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>]
Description
O cmdlet Get-AzureSiteRecoveryProtectionEntity obtém as entidades protegíveis ou protegidas, como máquinas virtuais, no cofre atual do Azure Site Recovery.
Exemplos
Exemplo 1: Exibir uma máquina virtual protegida em um contêiner
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
O primeiro comando obtém um contêiner protegido usando o cmdlet Get-AzureSiteRecoveryProtectionContainer e, em seguida, armazena esse objeto na variável $Container.
O segundo comando obtém a máquina virtual protegida que pertence ao contêiner no $Container e a exibe.
Parâmetros
-Id
Especifica a ID de uma entidade de proteção a ser obtida.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Especifica o nome de uma entidade de proteção a ser obtida.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
Especifica o perfil do Azure a partir do qual este cmdlet lê. Se você não especificar um perfil, esse cmdlet será lido a partir do perfil padrão local.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProtectionContainer
Especifica um contêiner de proteção.
Type: | ASRProtectionContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ProtectionContainerId
Especifica a ID de um contêiner protegido.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |