Checking Exchange 2010 Database Health with PowerShell
Just a quick script that checks your databases. Anything besides ‘Healthy’ or ‘Mounted’ should probably be investigated. :)
Add-PSSnapin *0* -ErrorAction SilentlyContinue
$mailboxservers = get-mailboxserver | get-exchangeserver | ?{$_.IsE14OrLater -eq 'True'}
$A = (get-host).UI.RawUI
$A.WindowTitle = "Database Health Check"
$B = $A.windowsize
$B.width = 110
$B.height = 30
$A.WindowSize = $B
while ($true) {cls; foreach ($mailboxserver in $mailboxservers){Get-MailboxDatabaseCopyStatus -Server $mailboxserver.name | ft -AutoSize Name,*Status,ContentIndexState,CopyQueueLength,ReplayQueueLength} ;sleep 5}
This it the output, refreshed every 5 seconds:
An example of when databases are actually doing something:
Posted: August 16th, 2010
Categories: Exchange Server, PowerShell
Tags: Exchange 2010, PowerShell
Comments: 1 Comment.
Categories: Exchange Server, PowerShell
Tags: Exchange 2010, PowerShell
Comments: 1 Comment.
Comments
Pingback from logicspot.NET » Blog Archive » Userful script to get updated information on the database copy queue lenght - June 25, 2011 at 12:52 pm
[...] this on Jeremy Phillips Exchange site. Good job [...]

