CAS Mini Health Assessment

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

Download the complete PS1 here: casMiniHealthAssessment_v1.zip (1.03 kb)

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

Get-Date | Select-Object Date | convertTo-HTML -head $a -Title "HealthCheck" | Out-File c:\HealthReport.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>"

$CASRole = Get-ClientAccessServer

Foreach ($CASServer in $CASRole)

{

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

test-outlookwebservices -ClientAccessServer "$CASServer" | convertTo-HTML -body "<Font Color = Black><B>----------------------- Outlook Web Services -----------------</B></Font Color>" | Out-File c:\HealthReport.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:\HealthReport.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:\HealthReport.htm -append

Test-OwaConnectivity -ClientAccessServer "$Casserver" | Select-Object Result, MailboxServer, Latency | convertTo-HTML -Body "<Font Color = Black><B>----------------- OwaConnectivity ---------------------</B></Font Color>" | Out-File c:\HealthReport.htm -append

Test-WebServicesConnectivity -UseAutodiscoverForClientAccessServer -AllowUnsecureAccess | Select-Object ClientAccessServer, MailboxServer, Scenario, Result, Latency, Error | convertTo-HTML -Body "<Font Color = Black><B>-----------------Test Web Services---------------------</B></Font Color>" | Out-File c:\HealthReport.htm -append

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

}

Powered by BlogEngine.NET 1.5.0.7 | Log in

Calendar

<<  June 2013  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar