HUB Mini Health Assessment

This script will help to provide a mini health assessment of your Exchange 2007 HUB role.

Download the complete PS1 here: hubMiniHealthAssessment_v1.zip (756.00 bytes)

Insert the PowerShell information into a PS1 file and you should be good to go.  For more info, see the blog post here.

Code

Get-Date | Select-Object Date | convertTo-HTML -head $a -Title "HealthCheck" | Out-File c:\HUBHealthReport.htm

$a= "<script src=c:\temp\sorttable.js type=text/javascript></script>"

$a = $a + "<style>"

$a = $a + "BODY{background-color:#717d7d;}"

$a = $a + "TABLE.sortable thead {border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}"

$a = $a + "TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:#827b60}"

$a = $a + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:#c9c299}"

$a = $a + "</style>"

$HUBRole = Get-transportserver

Foreach ($HUBServer in $HUBRole)

{

convertTo-HTML -head $a -Title "HUB Server Health Report" -Body "<H2>$HUBServer</H2>" | Out-File c:\HUBHealthReport.htm -append

test-servicehealth | select-object Role, {$_.ServicesRunning} | convertTo-HTML -body "<Font Color = Black><B>----------------- List Of Core Services That Are Running -----------------</B></Font Color>" | Out-File c:\HUBHealthReport.htm -append

test-servicehealth | select-object Role,{$_.ServicesNotRunning} | convertTo-HTML -Body "<Font Color = Black><B>----------------- List Of Core Services That Are Not Running -----------------</B></Font Color>" | Out-File c:\HUBHealthReport.htm -append

Test-EdgeSynchronization | convertTo-HTML -Body "<Font Color = Black><B>----------------- Test EDGE Sync ---------------------</B></Font Color>" | Out-File c:\HUBHealthReport.htm -append

Test-SystemHealth -ServerList $HUBServer -DownloadConfigurationUpdates:$False 2>&1 | convertTo-HTML -body "<Font Color = Black><B>----------------------- Overall System Health -----------------</B></Font Color>" | Out-File c:\HUBHealthReport.htm -append

}

 

Powered by BlogEngine.NET 1.5.0.7 | Log in

Calendar

<<  May 2012  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar