Get-VMReplication
Gets the replication settings for a virtual machine.
Syntax
Get-VMReplication
[[-VMName] <String[]>]
[-ComputerName <String[]>]
[-PrimaryServerName <String>]
[-ReplicaServerName <String>]
[-ReplicationHealth <VMReplicationHealthState>]
[-ReplicationMode <VMReplicationMode>]
[-ReplicationState <VMReplicationState>]
[-TrustGroup <String>]
Get-VMReplication
[-VM] <VirtualMachine[]>
Description
The Get-VMReplication cmdlet gets the replication settings for a virtual machine.
Examples
Example 1
PS C:\>Get-VMReplication
This example gets the replication settings of all replication-enabled virtual machines on the local Hyper-V host.
Example 2
PS C:\>Get-VMReplication VM01
This example gets the replication settings of a virtual machine named VM01.
Example 3
PS C:\>Get-VMReplication -ReplicaServerName server01.domain01.contoso.com
This example gets the replication settings of all virtual machines replicating to server server01.domain01.contoso.com.
Example 4
PS C:\>Get-VMReplication -ReplicationState Replicating
This example gets the replication settings of all virtual machines in the Replicating state.
Example 5
PS C:\>Get-VMReplication -TrustGroup DEFAULT
This example gets the replication settings of all virtual machines in a trust group named DEFAULT.
Example 6
PS C:\>Get-VMReplication -ReplicationMode Primary
This example gets the replication settings of all primary virtual machines on the local host.
Parameters
-ComputerName
Specifies one or more Hyper-V hosts from which virtual machine replication settings are to be retrieved. NetBIOS names, IP addresses, and fully-qualified domain names are allowable. The default is the local computer - use "localhost" or a dot (".") to specify the local computer explicitly.
Type: | String[] |
Position: | Named |
Default value: | . |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PrimaryServerName
Specifies the primary server of the virtual machines whose replication settings are to be retrieved.
Type: | String |
Aliases: | PrimaryServer |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplicaServerName
Specifies the replica server name of the virtual machines whose replication settings are to be retrieved.
Type: | String |
Aliases: | ReplicaServer |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplicationHealth
Gets replication settings for virtual machines with the specified replication health state. Valid values are Normal, Warning, and Critical.
Type: | VMReplicationHealthState |
Aliases: | Health |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplicationMode
Gets the replication settings for virtual machines with the specified replication mode. Valid values are None, Primary, Replica, and TestReplica.
Type: | VMReplicationMode |
Aliases: | Mode |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplicationState
Gets replication settings for virtual machines with the specified replication state. Valid values are:
Error
FailOverWaitingCompletion
FailedOver
NotApplicable
ReadyForInitialReplication
Replicating
Resynchronizing
ResynchronizeSuspended
Suspended
SyncedReplicationComplete
WaitingForInitialReplication
WaitingForStartResynchronize
Type: | VMReplicationState |
Aliases: | State |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TrustGroup
Specifies the trust group of the virtual machines whose replication settings you want to retrieve.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VM
Specifies the virtual machine whose replication settings are to be retrieved.
Type: | VirtualMachine[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMName
Specifies the name of the virtual machine whose replication settings are to be retrieved.
Type: | String[] |
Aliases: | Name |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Outputs
VMReplication
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for