Hi I have a script that displays the power supply status
Dn OperState Perf Thermal Voltage
sys/chassis-1/psu-1 operable ok ok ok
sys/chassis-1/psu-2 operable ok ok ok
sys/chassis-1/psu-3 operable ok ok ok
sys/chassis-1/psu-4 operable ok ok ok
sys/chassis-2/psu-1 operable ok ok ok
sys/chassis-2/psu-2 operable ok ok ok
sys/chassis-2/psu-3 operable ok ok ok
Here is the code. How do I modify this code so the html displays green color for "ok" status. Any other status display red?
Add-Content $report @'
<a name="ChassisandFabricInterconnectPowerSupplyStatus" />
<H2>Chassis and Fabric Interconnect Power Supply Status</H2>
'@
Get-UcsPsu -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Dn,OperState,Perf,Thermal,Voltage | ConvertTo-Html -Fragment | Out-File ucspsus.html
Get-Content ucspsus.html | Add-Content $report