Edit

Share via


Measure-VMReplication

Gets replication statistics and information associated with a virtual machine.

Syntax

VMName (Default)

Measure-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

Measure-VMReplication
    [-VM] <VirtualMachine[]>
    [-ReplicationRelationshipType <VMReplicationRelationshipType>]
    [<CommonParameters>]

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.

Examples

Example 1

PS C:\> Measure-VMReplication

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

Example 2

PS C:\> Measure-VMReplication VM01

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

Example 3

PS C:\>  Measure-VMReplication -ReplicationHealth Warning

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

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 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.

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 name of a primary server. Replication statistics are retrieved for all virtual machines from the specified primary server.

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 name of a Replica server of the virtual machines whose replication statistics you want to get.

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

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

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

Specifies the replication mode of the virtual machines whose replication statistics you want to get. Valid values are "None", "Primary", "Replica", "TestReplica" and "ExtendedReplica"

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 replication statistics and information associated with 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

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

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

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

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

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.

Outputs

Microsoft.HyperV.PowerShell.VMReplicationHealth