Get-VMReplication
Gets the replication settings for a virtual machine.
Syntax
VMName (Default)
Get-VMReplication
[[-VMName] <String[]>]
[-CimSession <CimSession[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential[]>]
[-ReplicaServerName <String>]
[-PrimaryServerName <String>]
[-ReplicationState <VMReplicationState>]
[-ReplicationHealth <VMReplicationHealthState>]
[-ReplicationMode <VMReplicationMode>]
[-ReplicationRelationshipType <VMReplicationRelationshipType>]
[-TrustGroup <String>]
[<CommonParameters>]
VMObject
Get-VMReplication
[-VM] <VirtualMachine[]>
[-ReplicationRelationshipType <VMReplicationRelationshipType>]
[<CommonParameters>]
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
-CimSession
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Parameter properties
Type: | CimSession[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
VMName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-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.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
VMName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Credential
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
Parameter properties
Type: | PSCredential[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
VMName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PrimaryServerName
Specifies the primary server of the virtual machines whose replication settings are to be retrieved.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | PrimaryServer |
Parameter sets
VMName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ReplicaServerName
Specifies the replica server name of the virtual machines whose replication settings are to be retrieved.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | ReplicaServer |
Parameter sets
VMName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ReplicationHealth
Gets replication settings for virtual machines with the specified replication health state. Valid values are Normal, Warning, and Critical.
Parameter properties
Type: | VMReplicationHealthState |
Default value: | None |
Accepted values: | NotApplicable, Normal, Warning, Critical |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Health |
Parameter sets
VMName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ReplicationMode
Gets the replication settings for virtual machines with the specified replication mode. Valid values are None, Primary, Replica, and TestReplica.
Parameter properties
Type: | VMReplicationMode |
Default value: | None |
Accepted values: | None, Primary, Replica, TestReplica, ExtendedReplica |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Mode |
Parameter sets
VMName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ReplicationRelationshipType
Specifies the replication relationship type of the virtual machine. Specify whether the replication relationship is a simple primary to replica or is an extended replication chain. The cmdlet gets the replication settings for the virtual machines that have the replication type that you specify.
Parameter properties
Type: | VMReplicationRelationshipType |
Default value: | None |
Accepted values: | Simple, Extended |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Relationship |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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
Parameter properties
Type: | VMReplicationState |
Default value: | None |
Accepted values: | Disabled, ReadyForInitialReplication, InitialReplicationInProgress, WaitingForInitialReplication, Replicating, PreparedForFailover, FailedOverWaitingCompletion, FailedOver, Suspended, Error, WaitingForStartResynchronize, Resynchronizing, ResynchronizeSuspended, RecoveryInProgress, FailbackInProgress, FailbackComplete, WaitingForUpdateCompletion, UpdateError, WaitingForRepurposeCompletion, PreparedForSyncReplication, PreparedForGroupReverseReplication, FiredrillInProgress |
Supports wildcards: | False |
DontShow: | False |
Aliases: | State |
Parameter sets
VMName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TrustGroup
Specifies the trust group of the virtual machines whose replication settings you want to retrieve.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
VMName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-VM
Specifies the virtual machine whose replication settings are to be retrieved.
Parameter properties
Type: | VirtualMachine[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
VMObject
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-VMName
Specifies the name of the virtual machine whose replication settings are to be retrieved.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Name |
Parameter sets
VMName
Position: | 0 |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.