Hi Friends, scenario where you have multiple UCSM with hundreds of blades and rack servers managed UCSM. Though UCSM alert us with all critical alerts real time, most of the time it is difficult to track the critical alerts for me due to large number of events generated from UCSM. It was tough for us to isolate the issue unless we login to each UCSM and check for the faults.

Here I created a simple script that do this function for me, currently I have created this report only inoperable devices of UCS chassis and Blades.

This script also gives us the blade location, SL#, bad parts etc.

Report will be like this and send to your mailbox


#———————- Start of Script —————————–

$body= “<p><u><b><span style=’font-size:10.0pt;font-family:Century Gothic’>UCS Server Issue reported </span></b></u> </p>

<table border=’1′ bgcolor=’#ffffff’>
<th>Issue Server</th>
<th>Server location</th>
<th>Serial Number</th>
<th>Operational State</th>

Import-Module “C:\Program Files (x86)\Cisco\Cisco UCS Manager PowerTool\Modules\CiscoUcsPS\CiscoUcs.dll”
$ucsms = @(“UCSM01″, ” UCSM01″, ” UCSM02″, ” UCSM03″, ” UCSM04″)
$ucscred = get-credential

foreach ($ucsm in $ucsms){
Connect-Ucs $ucsm -Credential $ucscred
$chassiss = Get-UcsChassis

foreach ($chassis in $chassiss){
$decrucs = @()
$chassisname = $chassis.Rn
$ChassisSl = $chassis.Serial
$chassisOperState = $chassis.OperState
$chassisModel = $chassis.Model

$chassis| get-ucsfault |?{$_.Descr -like “*inoperable*” -and $_.Descr -notlike “*server*” -and $_.Severity -ne “cleared”}| %{
$decrucs = $_.Descr

$body += ”



$servers = Get-UcsServer

foreach ($server in $servers)


$decr = @()
$ucs = $server.Ucs
$serverSl = $server.Serial
$UcsDn = $server.Dn
$serverOperState = $server.OperState
$ServerModel = $server.Model
$ServerName = $server.AssignedToDn
$ServerName = $ServerName.trim(“org-root/ls-“)

$server | get-ucsfault |? {$_.Descr -like “*inoperable*” -and $_.Severity -ne “cleared”} | %{

$decr = $_.Descr

$body += ”


$body += “</table>”

$rec = “”
Send-MailMessage -Body $body -To $rec -From “” -Subject “UCS Hardware alerts” -SmtpServer smtp. -BodyAsHtml -priority High



#———————- End of Script —————————–

Here UCSM0x are USCM domain names where script going to check for chassis and blade health.

You may schedule it on task scheduler, not get-credential wont work here. You may save the encrypted password to run if you schedule it. Refer “” for saving credentials for running task schedules

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s