Delen via


Get-AzureSiteRecoveryVM

Haalt informatie op over door Site Recovery beheerde virtuele machines.

Notitie

De cmdlets waarnaar in deze documentatie wordt verwezen, zijn bedoeld voor het beheren van verouderde Azure-resources die gebruikmaken van ASM-API's (Azure Service Manager). Deze verouderde PowerShell-module wordt niet aanbevolen bij het maken van nieuwe resources, omdat ASM is gepland voor buitengebruikstelling. Zie Buitengebruikstelling van Azure Service Manager voor meer informatie.

De Az PowerShell-module is de aanbevolen PowerShell-module voor het beheren van ARM-resources (Azure Resource Manager) met PowerShell.

Syntax

Get-AzureSiteRecoveryVM
   -ProtectionContainer <ASRProtectionContainer>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSiteRecoveryVM
   -Id <String>
   -ProtectionContainer <ASRProtectionContainer>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSiteRecoveryVM
   -Id <String>
   -ProtectionContainerId <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSiteRecoveryVM
   -Name <String>
   -ProtectionContainer <ASRProtectionContainer>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSiteRecoveryVM
   -Name <String>
   -ProtectionContainerId <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSiteRecoveryVM
   -ProtectionContainerId <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

De cmdlet Get-AzureSiteRecoveryVM haalt informatie op over virtuele machines die worden beheerd in Azure Site Recovery.

Voorbeelden

Voorbeeld 1: Informatie ophalen over een virtuele machine

PS C:\> $ProtectionContainer = Get-AzureSiteRecoveryProtectionContainer
PS C:\> Get-AzureSiteRecoveryVM -ProtectionContainer $ProtectionContainer
ID                          : a205fd17-3848-4896-bab6-9dbccc3cd8ed
ServerId                    : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c
ProtectionContainerId       : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c_1c513d45-645d-4ed0-b9ae-e7b869a1f7fc
Name                        : vm1
Type                        : VirtualMachine
FabricObjectId              : 86447b9e-d877-4e9a-8302-adcd6bbf18c0
Protected                   : False
CanCommit                   : False
CanFailover                 : True
CanReverseReplicate         : False
ActiveLocation              : Primary
ProtectionState             : Enabled
ReplicationHealth           : Healthy
TestFailoverState           : None
ReplicationProvider         : HyperVReplica

De eerste opdracht maakt gebruik van de cmdlet Get-AzureSiteRecoveryProtectionContainer om een beveiligde container op te halen en slaat deze vervolgens op in de variabele $ProtectionContainer.

Met de tweede opdracht wordt informatie opgehaald over de virtuele machines in $ProtectionContainer.

Parameters

-Id

Hiermee geeft u de id op van de virtuele machine waarover informatie moet worden opgehaald.

Type:String
Position:Named
standaardwaarde:None
Vereist:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Hiermee geeft u de naam van de virtuele machine.

Type:String
Position:Named
standaardwaarde:None
Vereist:True
Accept pipeline input:False
Accept wildcard characters:False

-Profile

Hiermee geeft u het Azure-profiel op waaruit deze cmdlet wordt gelezen. Als u geen profiel opgeeft, leest deze cmdlet uit het lokale standaardprofiel.

Type:AzureSMProfile
Position:Named
standaardwaarde:None
Vereist:False
Accept pipeline input:False
Accept wildcard characters:False

-ProtectionContainer

Hiermee geeft u het Site Recovery-beveiligingscontainerobject.

Type:ASRProtectionContainer
Position:Named
standaardwaarde:None
Vereist:True
Accept pipeline input:True
Accept wildcard characters:False

-ProtectionContainerId

Hiermee geeft u de id op van een beveiligde container waarover informatie moet worden opgehaald.

Type:String
Position:Named
standaardwaarde:None
Vereist:True
Accept pipeline input:False
Accept wildcard characters:False