Exchange2013: Testing MRS Across A DAG
In Exchange 2013, it may become necessary to test the Mailbox Replication Service (MRS) against all members of a Database Availability Group (DAG). To do this, we can perform the following script:
#We obtain the member servers of the DAG
$Servers = ((Get-DatabaseAvailabilityGroup LAB-NAEX15-01).Servers).Name
#We perform a 'foreach' against each member
foreach($server in $Servers)
{
Write-Host -ForegroundColor Green $server.Name
Test-MRSHealth -Identity $server -MonitoringContext:$TRUE
}
When we perform the above script, we should receive output like the following:
PERSEPHONE
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : ServiceCheck
Passed : True
Message : The Mailbox Replication Service is running.
Identity : PERSEPHONE
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : RPCPingCheck
Passed : True
Message : The Microsoft Exchange Mailbox Replication service is responding to a RPC ping. Server version: 15.0.712.11 caps:3F.
Identity : PERSEPHONE
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : QueueScanCheck
Passed : True
Message : The Microsoft Exchange Mailbox Replication service is scanning mailbox database queues for jobs. Last scan age: 00:14:22.0340000.
Identity : PERSEPHONE
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Events : {Source: MSExchange Monitoring MRSHealth
Id: 1000
Type: Success
Message: MRSHealth check passed.}
PerformanceCounters : {Object: MSExchange Monitoring MRSHealth
Counter: Last Scan Age (secs)
Instance: PERSEPHONE
Value: 862}
MINERVA
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : ServiceCheck
Passed : True
Message : The Mailbox Replication Service is running.
Identity : MINERVA
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : RPCPingCheck
Passed : True
Message : The Microsoft Exchange Mailbox Replication service is responding to a RPC ping. Server version: 15.0.712.11 caps:3F.
Identity : MINERVA
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : QueueScanCheck
Passed : True
Message : The Microsoft Exchange Mailbox Replication service is scanning mailbox database queues for jobs. Last scan age: 00:03:35.9990000.
Identity : MINERVA
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Events : {Source: MSExchange Monitoring MRSHealth
Id: 1000
Type: Success
Message: MRSHealth check passed.}
PerformanceCounters : {Object: MSExchange Monitoring MRSHealth
Counter: Last Scan Age (secs)
Instance: MINERVA
Value: 215}
CHARON
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : ServiceCheck
Passed : True
Message : The Mailbox Replication Service is running.
Identity : CHARON
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : RPCPingCheck
Passed : True
Message : The Microsoft Exchange Mailbox Replication service is responding to a RPC ping. Server version: 15.0.516.29 caps:3F.
Identity : CHARON
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : QueueScanCheck
Passed : True
Message : The Microsoft Exchange Mailbox Replication service is scanning mailbox database queues for jobs. Last scan age: 00:07:23.1520000.
Identity : CHARON
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Events : {Source: MSExchange Monitoring MRSHealth
Id: 1000
Type: Success
Message: MRSHealth check passed.}
PerformanceCounters : {Object: MSExchange Monitoring MRSHealth
Counter: Last Scan Age (secs)
Instance: CHARON
Value: 443}
AGAMEMNON
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : ServiceCheck
Passed : True
Message : The Mailbox Replication Service is running.
Identity : AGAMEMNON
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : RPCPingCheck
Passed : True
Message : The Microsoft Exchange Mailbox Replication service is responding to a RPC ping. Server version: 15.0.712.11 caps:3F.
Identity : AGAMEMNON
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Check : QueueScanCheck
Passed : True
Message : The Microsoft Exchange Mailbox Replication service is scanning mailbox database queues for jobs. Last scan age: 00:07:51.9760000.
Identity : AGAMEMNON
IsValid : True
ObjectState : New
RunspaceId : b14e1547-c215-4dbb-8ee1-a3c4978ca7c3
Events : {Source: MSExchange Monitoring MRSHealth
Id: 1000
Type: Success
Message: MRSHealth check passed.}
PerformanceCounters : {Object: MSExchange Monitoring MRSHealth
Counter: Last Scan Age (secs)
Instance: AGAMEMNON
Value: 471}
Comments
- Anonymous
January 01, 2003
foreach($server in $Serverz)nneds to be $servers:) - Anonymous
January 01, 2003
@Anonymous - Thanks for catching the typo. :)