Measure-VMReplication

Measure-VMReplication

Gets replication statistics and information associated with a virtual machine.

Syntax

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

Parameter Set: VMObject
Measure-VMReplication [-VM] <VirtualMachine[]> [ <CommonParameters>]

Detailed Description

The Measure-VMReplication cmdlet gets replication statistics and information associated with virtual machine. Replication statistics are calculated for a predetermined amount of time based on the monitoring interval specified through the Set-VMReplicationServer cmdlet.

Parameters

-ComputerName<String[]>

Specifies one or more Hyper-V hosts from which to get replication statistics. 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 name of a primary server. Replication statistics are retrieved for all virtual machines from the specified primary server.

Aliases

PrimaryServer

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VM<VirtualMachine[]>

Specifies the virtual machine for which you want to get replication statistics.

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 for which you want to get virtual machine replication statistics.

Aliases

Name

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-ReplicaServerName<String>

Specifies the name of a Replica server of the virtual machines whose replication statistics you want to get.

Aliases

ReplicaServer

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ReplicationHealth<VMReplicationHealthState>

Specifies the replication health of the virtual machines whose replication statistics you want to get. Valid values are “Critical”, “Warning”, “Normal”, and “NotApplicable”.

Aliases

Health

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ReplicationMode<VMReplicationMode>

Specifies the replication mode of the virtual machines whose replication statistics you want to get. 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

-ReplicationState<VMReplicationState>

Specifies the replication state of the virtual machines for which you want to get replication statistics. 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 a trust group associated with the virtual machines whose replication statistics you want to get.

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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

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.

  • VMReplicationHealth

Examples

Example 1

This example gets the replication monitoring details of all replicating virtual machines on the local host.

PS C:\> Measure-VMReplication

Example 2

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

PS C:\> Measure-VMReplication VM01

Example 3

This example gets the replication monitoring details of all virtual machines that have a replication health of “Warning”.

PS C:\>  Measure-VMReplication –ReplicationHealth Warning