Export (0) Print
Expand All
Expand Minimize

Get-VMReplication

Windows Server 2012 R2 and Windows 8.1

Updated: June 10, 2014

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Get-VMReplication

Gets the replication settings for a virtual machine.

Syntax

Parameter Set: VMName
Get-VMReplication [[-VMName] <String[]> ] [-ComputerName <String[]> ] [-PrimaryServerName <String> ] [-ReplicaServerName <String> ] [-ReplicationHealth <VMReplicationHealthState> ] [-ReplicationMode <VMReplicationMode> ] [-ReplicationRelationshipType <VMReplicationRelationshipType> ] [-ReplicationState <VMReplicationState> ] [-TrustGroup <String> ] [ <CommonParameters>]

Parameter Set: VMObject
Get-VMReplication [-VM] <VirtualMachine[]> [-ReplicationRelationshipType <VMReplicationRelationshipType> ] [ <CommonParameters>]




Detailed Description

The Get-VMReplication cmdlet gets the replication settings for a virtual machine.

Parameters

-ComputerName<String[]>

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.


Aliases

none

Required?

false

Position?

named

Default Value

.

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PrimaryServerName<String>

Specifies the primary server of the virtual machines whose replication settings are to be retrieved.


Aliases

PrimaryServer

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VM<VirtualMachine[]>

Specifies the virtual machine whose replication settings are to be retrieved.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMName<String[]>

Specifies the name of the virtual machine whose replication settings are to be retrieved.


Aliases

Name

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

true

-ReplicaServerName<String>

Specifies the replica server name of the virtual machines whose replication settings are to be retrieved.


Aliases

ReplicaServer

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ReplicationHealth<VMReplicationHealthState>

Gets replication settings for virtual machines with the specified replication health state. Valid values are Normal, Warning, and Critical.


Aliases

Health

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ReplicationMode<VMReplicationMode>

Gets the replication settings for virtual machines with the specified replication mode. Valid values are None, Primary, Replica, and TestReplica.


Aliases

Mode

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ReplicationRelationshipType<VMReplicationRelationshipType>

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.


Aliases

Relationship

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ReplicationState<VMReplicationState>

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


Aliases

State

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TrustGroup<String>

Specifies the trust group of the virtual machines whose replication settings you want to retrieve.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • VMReplication

Examples

Example 1

This example gets the replication settings of all replication-enabled virtual machines on the local Hyper-V host.


PS C:\> Get-VMReplication

Example 2

This example gets the replication settings of a virtual machine named VM01.


PS C:\> Get-VMReplication VM01

Example 3

This example gets the replication settings of all virtual machines replicating to server server01.domain01.contoso.com.


PS C:\> Get-VMReplication –ReplicaServerName server01.domain01.contoso.com

Example 4

This example gets the replication settings of all virtual machines in the Replicating state.


PS C:\> Get-VMReplication –ReplicationState Replicating

Example 5

This example gets the replication settings of all virtual machines in a trust group named DEFAULT.


PS C:\> Get-VMReplication –TrustGroup DEFAULT

Example 6

This example gets the replication settings of all primary virtual machines on the local host.


PS C:\> Get-VMReplication –ReplicationMode Primary

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft