Description

This is an XML file that can be customized and then imported into Windows 2008 R2 Task Scheduler for scheduling the CheckDatabaseRedundancy.ps1 script.

The purpose of the script is to monitor the redundancy of replicated mailbox databases by validating that there is at least two configured and healthy and current copies, and to alert you when only a single healthy copy of a replicated database exists. In this case, both active and passive copies are counted when determining redundancy.

It goes with the following blog post:

http://msexchangeteam.com/archive/2010/05/20/454976.aspx

Script

XML
Edit|Remove
  <?xml version="1.0" encoding="UTF-16" ?>  
- <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> 
- <RegistrationInfo> 
  <Date>2010-05-11T15:55:47</Date>  
  <Author>administrator</Author>  
  </RegistrationInfo> 
- <Triggers> 
- <TimeTrigger> 
- <Repetition> 
  <Interval>PT1H</Interval>  
  <StopAtDurationEnd>false</StopAtDurationEnd>  
  </Repetition> 
  <StartBoundary>2010-05-11T15:55:00</StartBoundary>  
  <Enabled>true</Enabled>  
  </TimeTrigger> 
  </Triggers> 
- <Principals> 
- <Principal id="Author"> 
  <UserId>SYSTEM</UserId>  
  <RunLevel>HighestAvailable</RunLevel>  
  </Principal> 
  </Principals> 
- <Settings> 
- <IdleSettings> 
  <Duration>PT10M</Duration>  
  <WaitTimeout>PT1H</WaitTimeout>  
  <StopOnIdleEnd>true</StopOnIdleEnd>  
  <RestartOnIdle>false</RestartOnIdle>  
  </IdleSettings> 
  <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>  
  <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>  
  <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>  
  <AllowHardTerminate>true</AllowHardTerminate>  
  <StartWhenAvailable>false</StartWhenAvailable>  
  <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>  
  <AllowStartOnDemand>true</AllowStartOnDemand>  
  <Enabled>true</Enabled>  
  <Hidden>false</Hidden>  
  <RunOnlyIfIdle>false</RunOnlyIfIdle>  
  <WakeToRun>false</WakeToRun>  
  <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>  
  <Priority>7</Priority>  
  </Settings> 
- <Actions Context="Author"> 
- <Exec> 
  <Command>Powershell.exe</Command>  
  <Arguments>-NonInteractive -WindowStyle Hidden -command 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; C:\Operations\CheckDatabaseRedundancy.ps1 -MonitoringContext -ShowDetailedErrors -SummaryMailFrom:'SMTPFromAddress@contoso.com' -SendSummaryMailTos:@('SMTPToAddress@contoso.com') -ErrorAction:Continue</Arguments>  
  </Exec> 
  </Actions> 
  </Task>