
Part III: Working with PowerShell in a Production Environment
352
In the following example the cmdlet is run from the active node on the test mailbox cluster:
Test-ReplicationHealth -MonitoringContext:$true
to produce the following:
Server Check Result Error
------ ----- ------ -----
MB100 PassiveNodeUp Passed
MB100 ClusterNetwork Passed
MB100 QuorumGroup Passed
MB100 FileShareQuorum Passed
MB100 CmsGroup Passed
MB100 NodePaused Passed
MB100 DnsRegistrationStatus Passed
MB100 ReplayService Passed
MB100 DBMountedFailover Passed
Events : {Source: MSExchange Monitoring ReplicationHealth
Id: 10000
Type: Success
Message: No monitoring errors occurred. All Exchange
replication health checks passed.}
PerformanceCounters : {}
Performance Monitor
Another way to monitor the system is through Performance Monitor. The following example shows the
script pattern that can be used to retrieve any counter. The first thing to do is the counter, object,
instance, and server parameters. The script sets the variables to get the
CopyQueueLength on the passive
node. To get information about replication, the server must be set to the passive node. This example also
shows how to make the output overwrite itself, instead of continually scrolling.
$Current = $host.UI.RawUI.Get_CursorPosition()
$Object=”MSExchange Replication”
$Counter=”CopyQueueLength”
$Instance=”First Storage Group”
$Passive_Node=”MB101”
$perf ...