Get-AzureSiteRecoveryProtectionEntity
Hämtar skyddsbara eller skyddade entiteter i ett Site Recovery-valv.
Kommentar
De cmdletar som refereras i den här dokumentationen är till för att hantera äldre Azure-resurser som använder Service Management-API:er. Se Az PowerShell-modulen för cmdletar för att hantera Azure Resource Manager-resurser.
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
Cmdleten Get-AzureSiteRecoveryProtectionEntity hämtar de skyddsbara eller skyddade entiteterna, till exempel virtuella datorer, i det aktuella Azure Site Recovery-valvet.
Exempel
Exempel 1: Visa en skyddad virtuell dator i en container
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
Det första kommandot hämtar en skyddad container med cmdleten Get-AzureSiteRecoveryProtectionContainer och lagrar sedan objektet i variabeln $Container.
Det andra kommandot hämtar den skyddade virtuella datorn som tillhör containern i $Container och visar den sedan.
Parametrar
-Id
Anger ID för en skyddsentitet som ska hämtas.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Anger namnet på en skyddsentitet som ska hämtas.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
Anger den Azure-profil som den här cmdleten läser från. Om du inte anger någon profil läser den här cmdleten från den lokala standardprofilen.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProtectionContainer
Anger en skyddscontainer.
Type: | ASRProtectionContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ProtectionContainerId
Anger ID för en skyddad container.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |