Measure-VMReplication
Gets replication statistics and information associated with a virtual machine.
语法
Parameter Set: VMName
Measure-VMReplication [[-VMName] <String[]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-PrimaryServerName <String> ] [-ReplicaServerName <String> ] [-ReplicationHealth <VMReplicationHealthState]> ] [-ReplicationMode <VMReplicationMode]> ] [-ReplicationRelationshipType <VMReplicationRelationshipType]> ] [-ReplicationState <VMReplicationState]> ] [-TrustGroup <String> ] [ <CommonParameters>]
Parameter Set: VMObject
Measure-VMReplication [-VM] <VirtualMachine[]> [-ReplicationRelationshipType <VMReplicationRelationshipType]> ] [ <CommonParameters>]
详细说明
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.
参数
-CimSession<Microsoft.Management.Infrastructure.CimSession[]>
在远程会话中或远程计算机上运行该 cmdlet。输入计算机名或会话对象,如 New-cimsession 或 Get-cimsession cmdlet 的输出。默认为本地计算机上的当前会话。
别名 |
none |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
false |
-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.
别名 |
none |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
false |
-Credential<System.Management.Automation.PSCredential[]>
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
别名 |
none |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
false |
-PrimaryServerName<String>
Specifies the name of a primary server. Replication statistics are retrieved for all virtual machines from the specified primary server.
别名 |
PrimaryServer |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
false |
-VM<VirtualMachine[]>
Specifies the virtual machine for which you want to get replication statistics.
别名 |
none |
是否必需? |
true |
在哪里? |
1 |
默认值 |
none |
是否接受管道输入? |
True (ByValue) |
是否接受通配符? |
false |
-VMName<String[]>
Specifies the name of the virtual machine for which you want to get virtual machine replication statistics.
别名 |
Name |
是否必需? |
false |
在哪里? |
1 |
默认值 |
none |
是否接受管道输入? |
True (ByValue) |
是否接受通配符? |
false |
-ReplicaServerName<String>
Specifies the name of a Replica server of the virtual machines whose replication statistics you want to get.
别名 |
ReplicaServer |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
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”.
别名 |
Health |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
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”.
别名 |
Mode |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
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 replication statistics and information associated with the virtual machines that have the replication type that you specify.
别名 |
Relationship |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
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
别名 |
State |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
false |
-TrustGroup<String>
Specifies a trust group associated with the virtual machines whose replication statistics you want to get.
别名 |
none |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
false |
<CommonParameters>
此 cmdlet 支持常见的参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 TechNet 上的 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
输入
输入类型是可以传送到 cmdlet 的对象的类型。
输出
输出类型是 cmdlet 发出的对象的类型。
- VMReplicationHealth
示例
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