ucs healthcheck v7.4
TRANSCRIPT
-
8/18/2019 UCS HealthCheck v7.4
1/29
################################################################################################ Cisco UCS Health Check Report Version 7 by Jeremy Waldrop of Varrow - [email protected] ################################################################################################
####################################################################################################################################################### Setup instructions
## - Microsoft PowerShell 2 is required. PowerShell 2 is part of Windows 7/8/2008-R2/2012 ## - Cisco UCS PowerTool for UCSM - http://software.cisco.com/download/release.html?mdfid=283850978&softwareid=284574017&release=1.0.0&flowid=25021 ## - A local UCSM user
##
## ####################################################################################################################################################
########################################## Import the Cisco UCS PowerTool module #
#########################################Import-Module CiscoUcsPS
####################################### Prompt for UCSM IP and credentials #######################################$ucsmaddr = Read-Host "Enter name or IP of UCS Manager"$ucsmcreds = $Host.UI.PromptForCredential( "Cisco UCS Manager Authentication","Enter UCS Manager Login","","")
##################################################### Prompt for HTML report file output name and path #####################################################
$ReportFile = Read-Host "Enter path and file name for the HTML report file"New-Item -ItemType file $ReportFile -Force
################################## Get the current date and time ##################################$date = Get-Date
######################### Authenticate to UCSM #########################$handle1 = Connect-Ucs $ucsmaddr -NotDefault -Credential $ucsmcreds$handleArray = $handle1
################### Mail variables ###################$enablemail="no"$smtpServer = "smtpserver"$mailfrom = "Cisco UCS Healtcheck "$mailto = "[email protected]"
###################
-
8/18/2019 UCS HealthCheck v7.4
2/29
# Define the HTML ####################Add-Content $ReportFile "
-
8/18/2019 UCS HealthCheck v7.4
3/29
Add-Content $ReportFile " "Add-Content $ReportFile "ol#toc span {"Add-Content $ReportFile " background: url(tabs.gif) 100% 0;"Add-Content $ReportFile " display: block;"Add-Content $ReportFile " line-height: 2em;"Add-Content $ReportFile " padding-right: 10px;"Add-Content $ReportFile "}"Add-Content $ReportFile ""
##################### Define HTML Tabs #####################Add-Content $ReportFile ""Add-Content $ReportFile "UCS Health Check Report"Add-Content $ReportFile ""Add-Content $ReportFile ""Add-Content $ReportFile ""Add-Content $ReportFile "UCS Health Check Report"Add-Content $ReportFile $dateAdd-Content $ReportFile ""Add-Content $ReportFile "Hardware Inventory"Add-Content $ReportFile "Cluster State"Add-Content $ReportFile "Firmware Versions"Add-Content $ReportFile "System Configuration"Add-Content $ReportFile "Server Configuration"Add-Content $ReportFile "Pool Configuration"Add-Content $ReportFile "LAN Configuration"Add-Content $ReportFile "SAN Configuration"
Add-Content $ReportFile "Environmental Statistics"Add-Content $ReportFile "Ethernet Statistics"Add-Content $ReportFile "SAN FC Statistics"Add-Content $ReportFile "Fault Report"Add-Content $ReportFile ""
############################ Define HTML Table Style ############################
Add-Content $ReportFile "BODY{background-color:LightGoldenRodYellow;}TABLE{font-family: Tahoma;border-width: 2px;border-style: solid;border-color: black;border-collapse: collapse;}TH{border-width: 2px;padding: 2px;border-style: solid;border-color: black;background-color:LightGray}TD{border-width: 2px;padding: 2px;border-style: solid;border-color: black;background-color:white}"
################################## Tab 1, UCS Hardware Inventory ##################################Add-Content $ReportFile ""
-
8/18/2019 UCS HealthCheck v7.4
4/29
################################# Get UCS Fabric Interconnects #################################Add-Content $ReportFile "Fabric Interconnects"Get-UcsNetworkElement -Ucs $handleArray | Select-Object Ucs,Rn,OobIfIp,OobIfMask,OobIfGw,Operability,Model,Serial | ConvertTo-Html -Fragment | Out-File ucsfis.htmlGet-Content ucsfis.html | Add-Content $ReportFile
########################################## Get UCS Fabric Interconnect inventory ##########################################Add-Content $ReportFile "Fabric Interconnect Inventory"Get-UcsFiModule -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,Model,Descr,OperState,State,Serial | ConvertTo-Html -Fragment | Out-File ucsfi-inv.htmlGet-Content ucsfi-inv.html | Add-Content $ReportFile
########################## Get UCS License usage ##########################Add-Content $ReportFile "Fabric Interconnect License Usage"Get-UcsLicense -Ucs $handleArray | Sort-Object -Property Ucs,Scope | Select-Obje
ct Ucs,Scope,AbsQuant,UsedQuant,PeerStatus,OperState | ConvertTo-Html -Fragment| Out-File ucsfilic-inv.htmlGet-Content ucsfilic-inv.html | Add-Content $ReportFile
######################### Get UCS Chassis info #########################Add-Content $ReportFile "Chassis Inventory"Get-UcsChassis -Ucs $handleArray | Sort-Object -Property Ucs,Rn | Select-ObjectUcs,Rn,AdminState,Model,OperState,LicState,Power,Thermal,Serial | ConvertTo-Html -Fragment | Out-File ucschassis-inv.htmlGet-Content ucschassis-inv.html | Add-Content $ReportFile
############################### Get chassis IOM (FEX) info ###############################Add-Content $ReportFile "IO Module (FEX) Inventory"Get-UcsIom -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,ChassisId,Rn,Model,Discovery,ConfigState,OperState,Side,Thermal,Serial | ConvertTo-Html -Fragment | Out-File ucsiom-inv.htmlGet-Content ucsiom-inv.html | Add-Content $ReportFile
######################################################## Get UCS Fabric Interconnect to Chassis port mapping ########################################################Add-Content $ReportFile "Fabric Interconnect Chassis IOM Mappings"
Get-UcsEtherSwitchIntFIo -Ucs $handleArray | Select-Object Ucs,ChassisId,Discovery,Model,OperState,SwitchId,PeerSlotId,PeerPortId,SlotId,PortId,XcvrType | ConvertTo-Html -Fragment | Out-File ucsfichassisiommap.htmlGet-Content ucsfichassisiommap.html | Add-Content $ReportFile
######################################## Get all UCS servers and server info ########################################Add-Content $ReportFile "Server Inventory"Get-UcsBlade -Ucs $handleArray | Sort-Object -Property Ucs,ChassisID,SlotID | Se
-
8/18/2019 UCS HealthCheck v7.4
5/29
lect-Object Ucs,ServerId,Model,AvailableMemory,NumOfCpus,NumOfCores,NumOfCoresEnabled,NumOfThreads,NumOfAdaptors,NumOfEthHostIfs,NumOfFcHostIfs,AssignedToDn,Presence,OperState,Operability,OperPower,Serial | ConvertTo-Html -Fragment | Out-File ucsserver-inv.htmlGet-Content ucsserver-inv.html | Add-Content $ReportFile
################################################# Get UCS server adaptor (mezzanine card) info #################################################Add-Content $ReportFile "Server Adaptor Inventory"Get-UcsAdaptorUnit -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,ChassisId,BladeId,Rn,Model | ConvertTo-Html -Fragment | Out-File ucsadaptor-inv.htmlGet-Content ucsadaptor-inv.html| Add-Content $ReportFile
############################################## Get UCS server adaptor port expander info ##############################################Add-Content $ReportFile "Servers with Adaptor Port Expanders"Get-UcsAdaptorUnitExtn -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,Model,Presence | ConvertTo-Html -Fragment | Out-File ucsadaptorext-inv.htmlGet-Content ucsadaptorext-inv.html | Add-Content $ReportFile
################################## Get UCS server processor info ##################################Add-Content $ReportFile "Server CPU Inventory"Get-UcsProcessorUnit -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,SocketDesignation,Cores,CoresEnabled,Threads,Speed,OperState,Thermal,Model | Where-Object {$_.OperState -ne "removed"} | ConvertTo-Html -Fragment | Out-File ucsservercpu-inv.htmlGet-Content ucsservercpu-inv.html| Add-Content $ReportFile
############################### Get UCS server memory info ###############################
Add-Content $ReportFile "Server Memory Inventory"Get-UcsMemoryUnit -Ucs $handleArray | Sort-Object -Property Ucs,Dn,Location | where {$_.Capacity -ne "unspecified"} | Select-Object -Property Ucs,Dn,Location,Capacity,Clock,OperState,Model | ConvertTo-Html -Fragment | Out-File ucsservermemory-inv.htmlGet-Content ucsservermemory-inv.html| Add-Content $ReportFile
########################################### Get UCS server storage controller info ###########################################Add-Content $ReportFile "Server Storage Controller Inventory"Get-UcsStorageController -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Dn,Vendor,Model | ConvertTo-Html -Fragment | Out-File ucsdiskcontrolle
r-inv.htmlGet-Content ucsdiskcontroller-inv.html | Add-Content $ReportFile
################################### Get UCS server local disk info ###################################Add-Content $ReportFile "Server Local Disk Inventory"Get-UcsStorageLocalDisk -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,Model,Size,Serial | where {$_.Size -ne "unknown"} | ConvertTo-Html -Fragment | Out-File ucsserverdisks-inv.html
-
8/18/2019 UCS HealthCheck v7.4
6/29
Get-Content ucsserverdisks-inv.html | Add-Content $ReportFile
################# End of Tab 1 #################Add-Content $ReportFile ""
############################# Tab 2, UCS Cluster State #############################Add-Content $ReportFile ""
########################## Get UCS Cluster State ##########################Add-Content $ReportFile "Cluster State"Get-UcsStatus -Ucs $handleArray | Select-Object Name,VirtualIpv4Address,HaConfiguration,HaReadiness,HaReady,EthernetState,FiALeadership,FiAOobIpv4Address,FiAManagementServicesState,FiBLeadership,FiBOobIpv4Address,FiBManagementServicesState| ConvertTo-Html -Fragment | Out-File ucscluster.htmlGet-Content ucscluster.html | Add-Content $ReportFile
################# End of Tab 2 #
################Add-Content $ReportFile ""
################################## Tab 3, UCS Firmware Versions ##################################Add-Content $ReportFile ""
############################## Get UCSM firmware version ##############################Add-Content $ReportFile "UCS Manager Firmware Version"Get-UcsFirmwareRunning -Ucs $handleArray | Select-Object Ucs,Dn,Type,Version | S
ort-Object -Property Ucs,Dn | Where-Object {$_.Type -eq "mgmt-ext"} | ConvertTo-Html -Fragment | Out-File ucsmfirmwarever.htmlGet-Content ucsmfirmwarever.html | Add-Content $ReportFile
################################################## Get UCS Fabric Interconnect firmware versions ##################################################Add-Content $ReportFile "Fabric Interconnect Firmware Versions"Get-UcsFirmwareRunning -Ucs $handleArray | Select-Object Ucs,Dn,Type,Version | Sort-Object -Property Ucs,Dn | Where-Object {$_.Type -eq "switch-kernel" -OR $_.Type -eq "switch-software"} | ConvertTo-Html -Fragment | Out-File ucsfifirmwarever.htmlGet-Content ucsfifirmwarever.html | Add-Content $ReportFile
################################## Get UCS IOM firmware versions ##################################Add-Content $ReportFile "IO Module (FEX) Firmware Versions"Get-UcsFirmwareRunning -Ucs $handleArray | Select-Object Ucs,Deployment,Dn,Type,Version | Sort-Object -Property Ucs,Dn | Where-Object {$_.Type -eq "iocard"} | Where-Object -FilterScript {$_.Deployment -notlike "boot-loader"} | ConvertTo-Html -Fragment | Out-File ucsiomfirmwarever.htmlGet-Content ucsiomfirmwarever.html | Add-Content $ReportFile
-
8/18/2019 UCS HealthCheck v7.4
7/29
########################################## Get UCS Server CIMC firmware versions ##########################################Add-Content $ReportFile "Server CIMC Firmware Versions"Get-UcsFirmwareRunning -Ucs $handleArray | Select-Object Ucs,Deployment,Dn,Type,Version | Sort-Object -Property Ucs,Dn | Where-Object {$_.Type -eq "blade-controller"} | Where-Object -FilterScript {$_.Deployment -notlike "boot-loader"} | ConvertTo-Html -Fragment | Out-File ucscimcfirmwarever.htmlGet-Content ucscimcfirmwarever.html | Add-Content $ReportFile
############################################# Get UCS Server Adaptor firmware versions #############################################Add-Content $ReportFile "Server Adaptor Firmware Versions"Get-UcsFirmwareRunning -Ucs $handleArray | Select-Object Ucs,Deployment,Dn,Type,Version | Sort-Object -Property Ucs,Dn | Where-Object {$_.Type -eq "adaptor"} |Where-Object -FilterScript {$_.Deployment -notlike "boot-loader"} | ConvertTo-Html -Fragment | Out-File ucsadaptorfirmwarever.htmlGet-Content ucsadaptorfirmwarever.html | Add-Content $ReportFile
################################# Get UCS Server BIOS versions #################################
Add-Content $ReportFile "Server BIOS Versions"Get-UcsFirmwareRunning -Ucs $handleArray | Select-Object Ucs,Dn,Type,Version | Sort-Object -Property Ucs,Dn | Where-Object {$_.Type -eq "blade-bios"} | ConvertTo-Html -Fragment | Out-File ucsbiosver.htmlGet-Content ucsbiosver.html | Add-Content $ReportFile
################# End of Tab 3 #################Add-Content $ReportFile ""
################################ Tab 4, System Configuration #
###############################Add-Content $ReportFile ""
############################################ Get UCS Cluster Configuration and State ############################################Add-Content $ReportFile "Cluster Configuration"Get-UcsStatus -Ucs $handleArray | Select-Object Name,VirtualIpv4Address,HaConfiguration,HaReadiness,HaReady,FiALeadership,FiAOobIpv4Address,FiAOobIpv4DefaultGateway,FiAManagementServicesState,FiBLeadership,FiBOobIpv4Address,FiBOobIpv4DefaultGateway,FiBManagementServicesState | ConvertTo-Html -Fragment | Out-File ucsclusterconfig-inv.htmlGet-Content ucsclusterconfig-inv.html | Add-Content $ReportFile
################################################### Get UCS Management Interface Monitoring Policy ###################################################Add-Content $ReportFile "Manaagement Interface Monitoring Policy"Get-UcsMgmtInterfaceMonitorPolicy -Ucs $handleArray | Select-Object UCS,AdminState,EnableHAFailover,MonitorMechanism | ConvertTo-Html -Fragment | Out-File ucsmgmtmon-pol.htmlGet-Content ucsmgmtmon-pol.html | Add-Content $ReportFile
-
8/18/2019 UCS HealthCheck v7.4
8/29
############################################ Get UCS Global chassis discovery policy ############################################Add-Content $ReportFile "Chassis Discovery Policy"Get-UcsChassisDiscoveryPolicy -Ucs $handleArray | Select-Object Ucs,Rn,LinkAggregationPref,Action | ConvertTo-Html -Fragment | Out-File ucschassisdisc-pol.htmlGet-Content ucschassisdisc-pol.html | Add-Content $ReportFile
################################################### Get UCS Global chassis power redundancy policy ###################################################Add-Content $ReportFile "Chassis Power Redundancy Policy"Get-UcsPowerControlPolicy -Ucs $handleArray | Select-Object Ucs,Rn,Redundancy |ConvertTo-Html -Fragment | Out-File ucschassispower-pol.htmlGet-Content ucschassispower-pol.html | Add-Content $ReportFile
########################## Get UCS Organizations ##########################Add-Content $ReportFile "Organizations"Get-UcsOrg -Ucs $handleArray | Select-Object Ucs,Name,Dn | ConvertTo-Html -Fragment | Out-File ucsorgs.htmlGet-Content ucsorgs.html | Add-Content $ReportFile
######################### Get UCS Fault Policy #########################Add-Content $ReportFile "Fault Policy"Get-UcsFaultPolicy -Ucs $handleArray | Select-Object Ucs,Rn,AckAction,ClearAction,ClearInterval,FlapInterval,RetentionInterval | ConvertTo-Html -Fragment | Out-File ucsfaultpol.htmlGet-Content ucsfaultpol.html | Add-Content $ReportFile
####################################### Get UCS Syslog Remote Destinations #######################################Add-Content $ReportFile "Remote Syslog"
Get-UcsSyslogClient -Ucs $handleArray | Where-Object {$_.AdminState -ne "disabled"} | Select-Object Ucs,Rn,Severity,Hostname,ForwardingFacility | ConvertTo-Html -Fragment | Out-File ucssyslogremote.htmlGet-Content ucssyslogremote.html | Add-Content $ReportFile
########################### Get UCS Syslog Sources ###########################Add-Content $ReportFile "Syslog Sources"Get-UcsSyslogSource -Ucs $handleArray | Select-Object Ucs,Rn,Audits,Events,Faults | ConvertTo-Html -Fragment | Out-File ucsyslogsources.htmlGet-Content ucsyslogsources.html | Add-Content $ReportFile
############################## Get UCS Syslog Local File ##############################Add-Content $ReportFile "Syslog Local File"Get-UcsSyslogFile -Ucs $handleArray | Select-Object Ucs,Rn,Name,AdminState,Severity,Size | ConvertTo-Html -Fragment | Out-File ucsyslogfile.htmlGet-Content ucsyslogfile.html | Add-Content $ReportFile
##################################### Get UCS Full State Backup Policy #
-
8/18/2019 UCS HealthCheck v7.4
9/29
####################################Add-Content $ReportFile "Full State Backup Policy"Get-UcsMgmtBackupPolicy -Ucs $handleArray | Select-Object Ucs,Descr,Host,LastBackup,Proto,Schedule,AdminState | ConvertTo-Html -Fragment | Out-File ucsfullbackup.htmlGet-Content ucsfullbackup.html | Add-Content $ReportFile
##################################### Get UCS All Config Backup Policy #####################################Add-Content $ReportFile "All Configuration Backup Policy"Get-UcsMgmtCfgExportPolicy -Ucs $handleArray | Select-Object Ucs,Descr,Host,LastBackup,Proto,Schedule,AdminState | ConvertTo-Html -Fragment | Out-File ucsallcfgbackup.htmlGet-Content ucsallcfgbackup.html | Add-Content $ReportFile
############################# Get UCS LDAP server info #############################Add-Content $ReportFile "LDAP Providers"Get-UcsLdapProvider -Ucs $handleArray | Select-Object Ucs,Name,Rootdn,Basedn,Attribute | ConvertTo-Html -Fragment | Out-File ucsldapproviders.htmlGet-Content ucsldapproviders.html | Add-Content $ReportFile
################################ Get UCS LDAP group mappings ################################Add-Content $ReportFile "LDAP Group Mappings"Get-UcsLdapGroupMap -Ucs $handleArray | Select-Object Ucs,Name | ConvertTo-Html-Fragment | Out-File ucsldapgroupmaps.htmlGet-Content ucsldapgroupmaps.html | Add-Content $ReportFile
###################################### Get UCS user and LDAP group roles ######################################Add-Content $ReportFile "User Roles"Get-UcsUserRole -Ucs $handleArray | Select-Object Ucs,Name,Dn | Where-Object {$_
.Dn -like "sys/ldap-ext*"} | ConvertTo-Html -Fragment | Out-File ucsuserroles.htmlGet-Content ucsuserroles.html | Add-Content $ReportFile
######################################### Get UCS Native Authentication Source #########################################Add-Content $ReportFile "Native Authentication Configuration"Get-UcsNativeAuth -Ucs $handleArray | Select-Object Ucs,Rn,DefLogin,ConLogin,DefRolePolicy | ConvertTo-Html -Fragment | Out-File ucsnativeauth.htmlGet-Content ucsnativeauth.html | Add-Content $ReportFile
############################
# Get UCS Call Home config #############################Add-Content $ReportFile "Call Home Configuration"Get-UcsCallhome -Ucs $handleArray | Sort-Object -Property Ucs | Select-Object Ucs,AdminState | ConvertTo-Html -Fragment | Out-File ucscallhomecnfg.htmlGet-Content ucscallhomecnfg.html | Add-Content $ReportFile
################################## Get UCS Call Home SMTP Server ##################################
-
8/18/2019 UCS HealthCheck v7.4
10/29
Add-Content $ReportFile "Call Home SMTP Server"Get-UcsCallhomeSmtp -Ucs $handleArray | Sort-Object -Property Ucs | Select-Object Ucs,Host | ConvertTo-Html -Fragment | Out-File ucscallhomesmtpsrv.htmlGet-Content ucscallhomesmtpsrv.html | Add-Content $ReportFile
################################# Get UCS Call Home Recipients #################################Add-Content $ReportFile "Call Home Recipients"Get-UcsCallhomeRecipient -Ucs $handleArray | Sort-Object -Property Ucs | Select-Object Ucs,Dn,Email | ConvertTo-Html -Fragment | Out-File ucscallhomerecipients.htmlGet-Content ucscallhomerecipients.html | Add-Content $ReportFile
############################### Get UCS SNMP Configuration ###############################Add-Content $ReportFile "SNMP Configuration"Get-UcsSnmp -Ucs $handleArray | Sort-Object -Property Ucs | Select-Object Ucs,AdminState,Community,SysContact,SysLocation | ConvertTo-Html -Fragment | Out-Fileucscallsnmpcfg.htmlGet-Content ucscallsnmpcfg.html | Add-Content $ReportFile
#######################
# Get UCS DNS Servers ########################Add-Content $ReportFile "DNS Servers"Get-UcsDnsServer -Ucs $handleArray | Select-Object Ucs,Name | ConvertTo-Html -Fragment | Out-File ucsdnsservers.htmlGet-Content ucsdnsservers.html | Add-Content $ReportFile
######################## Get UCS NTP Servers ########################Add-Content $ReportFile "NTP Servers"Get-UcsNtpServer -Ucs $handleArray | Select-Object Ucs,Name | ConvertTo-Html -Fragment | Out-File ucsntpservers.html
Get-Content ucsntpservers.html | Add-Content $ReportFile
##################### Get UCS Timezone #####################Add-Content $ReportFile "Timezone"Get-UcsTimezone -Ucs $handleArray | Select-Object Ucs,Timezone | ConvertTo-Html-Fragment | Out-File ucstimezone.htmlGet-Content ucstimezone.html | Add-Content $ReportFile
################# End of Tab 4 #################
Add-Content $ReportFile ""
################################ Tab 5, Server Configuration ################################Add-Content $ReportFile ""
###################################### Get UCS Service Profile Templates ######################################
-
8/18/2019 UCS HealthCheck v7.4
11/29
Add-Content $ReportFile "Service Profile Templates"Get-UcsServiceProfile -Ucs $handleArray | Where-object {$_.Type -ne "instance"}| Sort-object -Property Ucs,Name | Select-Object Ucs,Dn,Name,BiosProfileName,BootPolicyName,HostFwPolicyName,LocalDiskPolicyName,MaintPolicyName,VconProfileName | ConvertTo-Html -Fragment | Out-File ucssptemplts.htmlGet-Content ucssptemplts.html | Add-Content $ReportFile
############################# Get UCS Service Profiles #############################Add-Content $ReportFile "Service Profiles"Get-UcsServiceProfile -Ucs $handleArray | Where-object {$_.Type -eq "instance"}| Sort-object -Property Ucs,Name | Select-Object Ucs,Dn,Name,OperSrcTemplName,AssocState,PnDn,BiosProfileName,IdentPoolName,Uuid,BootPolicyName,HostFwPolicyName,LocalDiskPolicyName,MaintPolicyName,VconProfileName,OperState | ConvertTo-Html -Fragment | Out-File ucssps.htmlGet-Content ucssps.html | Add-Content $ReportFile
############################## Get UCS SAN Boot Policies ##############################Add-Content $ReportFile "SAN Boot Policies"Get-UcsLsbootSanImagePath -Ucs $handleArray | sort-object -Property Ucs,Dn | Select-Object ucs,dn,type,vnicname,lun,wwn | Where-Object -FilterScript {$_.Dn -not
like "sys/chassis*"} |ConvertTo-Html -Fragment | Out-File ucssanbootpol.htmlGet-Content ucssanbootpol.html | Add-Content $ReportFile
################################# Get UCS Maintenance Policies #################################Add-Content $ReportFile "Maintenance Policies"Get-UcsMaintenancePolicy -Ucs $handleArray | Select-Object Ucs,Name,Dn,UptimeDisr,Descr | ConvertTo-Html -Fragment | Out-File ucsmaint.htmlGet-Content ucsmaint.html | Add-Content $ReportFile
################################### Get UCS Host Firmware Packages #
##################################Add-Content $ReportFile "Host Firmware Packages"Get-UcsFirmwareComputeHostPack -Ucs $handleArray | Select-Object Ucs,Dn,Name,BladeBundleVersion,RackBundleVersion | ConvertTo-Html -Fragment | Out-File ucshostfirmwarepackage.htmlGet-Content ucshostfirmwarepackage.html | Add-Content $ReportFile
################################ Get UCS Local Disk Policies ################################Add-Content $ReportFile "Local Disk Policies"Get-UcsLocalDiskConfigPolicy -Ucs $handleArray | Select-Object Ucs,Dn,Name,Mode,Descr | ConvertTo-Html -Fragment | Out-File ucsdiskpolicy.html
Get-Content ucsdiskpolicy.html | Add-Content $ReportFile
########################### Get UCS Scrub Policies ###########################Add-Content $ReportFile "Scrub Policies"Get-UcsScrubPolicy -Ucs $handleArray | Select-Object Ucs,Dn,Name,BiosSettingsScrub,DiskScrub | Where-Object {$_.Name -ne "policy"} | ConvertTo-Html -Fragment |Out-File ucsscrubpolicy.htmlGet-Content ucsscrubpolicy.html | Add-Content $ReportFile
-
8/18/2019 UCS HealthCheck v7.4
12/29
########################## Get UCS BIOS Policies ##########################Add-Content $ReportFile "BIOS Policies"Get-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Select-Object Ucs,Dn,Name | ConvertTo-Html -Fragment | Out-File ucsbiospols.htmlGet-Content ucsbiospols.html | Add-Content $ReportFile
################################# Get UCS BIOS Policy Settings #################################Add-Content $ReportFile "BIOS Policy Settings"Get-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfQuietBoot | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.htmlAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfPOSTErrorPause | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfResumeOnACPowerLoss | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfFrontPanelLockout | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosTurboBoost | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosEnhancedIntelSpeedStep | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* |ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosHyperThreading | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfCoreMultiProcessing | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosExecuteDisabledBit | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfIntelVirtualizationTechnology | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfDirectCacheAccess | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfProcessorCState | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -append -
8/18/2019 UCS HealthCheck v7.4
13/29
Add-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfProcessorC1E | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfProcessorC3Report | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfProcessorC6Report | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfProcessorC7Report | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfCPUPerformance | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfMaxVariableMTRRSetting | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp*| ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosIntelDirectedIO | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfSelectMemoryRASConfiguration | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosNUMA | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosLvDdrMode | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfUSBBootConfig | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfUSBFrontPanelAccessLock | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfUSBSystemIdlePowerOptimizingSetting | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfMaximumMemoryBelow4GB | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfMemoryMappedIOAbove4GB | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp*| ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -append -
8/18/2019 UCS HealthCheck v7.4
14/29
Add-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfBootOptionRetry | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfIntelEntrySASRAIDModule | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendAdd-Content ucsbios-settings.html "
" -Encoding UnicodeGet-UcsBiosPolicy -Ucs $handleArray | Where-Object {$_.Name -ne "SRIOV"} | Get-UcsBiosVfOSBootWatchdogTimer | Sort-Object UCS,Dn | Select-Object UCS,dn,Vp* | ConvertTo-Html -Fragment | Out-File ucsbios-settings.html -appendGet-Content ucsbios-settings.html | Add-Content $ReportFile################################################### Get UCS Service Profiles vNIC/vHBA Assignments ###################################################Add-Content $ReportFile "Service Profile vNIC/vHBA PCI Placements"Get-UcsLsVConAssign -Ucs $handleArray | Select-Object dn,vnicname,adminvcon,order | Sort-Object dn | ConvertTo-Html -Fragment | Out-File ucsvnicorder.htmlGet-Content ucsvnicorder.html | Add-Content $ReportFile
################# End of Tab 5 #
################Add-Content $ReportFile ""
################################ Tab 6, Pool Configuration ################################Add-Content $ReportFile ""
##################### Get UCS IP Pools #####################Add-Content $ReportFile "IP Pools"Get-UcsIpPool -Ucs $handleArray | Select-Object Ucs,Dn,Name,AssignmentOrder,Size
| ConvertTo-Html -Fragment | Out-File ucsippools.htmlGet-Content ucsippools.html | Add-Content $ReportFile
########################### Get UCS IP Pool Blocks ###########################Add-Content $ReportFile "IP Pool Blocks"Get-UcsIpPoolBlock -Ucs $handleArray | Select-Object Ucs,Dn,From,To,Subnet,DefGw | ConvertTo-Html -Fragment | Out-File ucsippoolblocks.htmlGet-Content ucsippoolblocks.html | Add-Content $ReportFile
########################################## Get UCS IP CIMC MGMT Pool Assignments #
#########################################Add-Content $ReportFile "CIMC IP Pool Assignments"Get-UcsIpPoolAddr -Ucs $handleArray | Sort-Object -Property Ucs,AssignedToDn | where {$_.Assigned -eq "yes"} | Select-Object Ucs,AssignedToDn,Id | ConvertTo-Html -Fragment | Out-File ucscimcpooladdr.htmlGet-Content ucscimcpooladdr.html | Add-Content $ReportFile
############################## Get UCS UUID Suffix Pools ##############################
-
8/18/2019 UCS HealthCheck v7.4
15/29
Add-Content $ReportFile "UUID Pools"Get-UcsUuidSuffixPool -Ucs $handleArray | Select-Object Ucs,Dn,Name,AssignmentOrder,Prefix,Size,Assigned | ConvertTo-Html -Fragment | Out-File ucsuuidpool.htmlGet-Content ucsuuidpool.html | Add-Content $ReportFile
#################################### Get UCS UUID Suffix Pool Blocks ####################################Add-Content $ReportFile "UUID Pool Blocks"Get-UcsUuidSuffixBlock -Ucs $handleArray | Select-Object Ucs,Dn,From,To | ConvertTo-Html -Fragment | Out-File ucsuuidpoolblocks.htmlGet-Content ucsuuidpoolblocks.html | Add-Content $ReportFile
####################################### Get UCS UUID UUID Pool Assignments #######################################Add-Content $ReportFile "UUID Pool Assignments"Get-UcsUuidpoolAddr -Ucs $handleArray | Where-Object {$_.Assigned -ne "no"} | select-object Ucs,AssignedToDn,Id | sort-object -property Ucs,AssignedToDn | ConvertTo-Html -Fragment | Out-File ucsuuidpooladdr.htmlGet-Content ucsuuidpooladdr.html | Add-Content $ReportFile
############################### Get UCS MAC Address Pools #
#############################Add-Content $ReportFile "MAC Address Pools"Get-UcsMacPool -Ucs $handleArray | Select-Object Ucs,Dn,Name,AssignmentOrder,Size,Assigned | ConvertTo-Html -Fragment | Out-File ucsmacpools.htmlGet-Content ucsmacpools.html | Add-Content $ReportFile
################################### Get UCS MAC Address Pool Blocks###################################Add-Content $ReportFile "MAC Address Pool Blocks"Get-UcsMacMemberBlock -Ucs $handleArray | Select-Object Ucs,Dn,From,To | ConvertTo-Html -Fragment | Out-File ucsmacpoolblocks.htmlGet-Content ucsmacpoolblocks.html | Add-Content $ReportFile
################################# Get UCS MAC Pool Assignments #################################Add-Content $ReportFile "MAC Address Pool Assignments"Get-UcsVnic -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,IdentPoolName,Addr | where {$_.Addr -ne "derived"} | ConvertTo-Html -Fragment | Out-File ucsmacpooladdr.htmlGet-Content ucsmacpooladdr.html | Add-Content $ReportFile
####################### Get UCS WWNN Pools #######################
Add-Content $ReportFile "WWN Pools"Get-UcsWwnPool -Ucs $handleArray | Select-Object Ucs,Dn,Name,AssignmentOrder,Purpose,Size,Assigned | ConvertTo-Html -Fragment | Out-File ucswwnpools.htmlGet-Content ucswwnpools.html | Add-Content $ReportFile
####################################### Get UCS WWNN/WWPN Pool Assignments #######################################Add-Content $ReportFile "WWN Pool Assignments"Get-UcsVhba -Ucs $handleArray | Sort-Object -Property Ucs,Addr | Select-Object U
-
8/18/2019 UCS HealthCheck v7.4
16/29
cs,Dn,IdentPoolName,NodeAddr,Addr | where {$_.NodeAddr -ne "vnic-derived"} | ConvertTo-Html -Fragment | Out-File ucswwnpooladdr.htmlGet-Content ucswwnpooladdr.html | Add-Content $ReportFile
######################### Get UCS Server Pools #########################Add-Content $ReportFile "Server Pools"Get-UcsServerPool -Ucs $handleArray | Select-Object Ucs,Dn,Name,Assigned | ConvertTo-Html -Fragment | Out-File ucsserverpools.htmlGet-Content ucsserverpools.html | Add-Content $ReportFile
#################################### Get UCS Server Pool Assignments ####################################Add-Content $ReportFile "Server Pool Assignments"Get-UcsServerPoolAssignment -Ucs $handleArray | Select-Object Ucs,Name,AssignedToDn | ConvertTo-Html -Fragment | Out-File ucsserverpoolassigned.htmlGet-Content ucsserverpoolassigned.html | Add-Content $ReportFile
################# End of Tab 6 #################Add-Content $ReportFile ""
############################# Tab 7, LAN Configuration #############################Add-Content $ReportFile ""
############################### Get UCS LAN Switching Mode ###############################Add-Content $ReportFile "Fabric Interconnect Ethernet Switching Mode"Get-UcsLanCloud -Ucs $handleArray | Select-Object Ucs,Rn,Mode | ConvertTo-Html -Fragment | Out-File ucsfiethmode.htmlGet-Content ucsfiethmode.html | Add-Content $ReportFile
################################################################## Get UCS Fabric Interconnect Ethernet port usage and role info ##################################################################Add-Content $ReportFile "Fabric Interconnect Ethernet Port Configuration"Get-UcsFabricPort -Ucs $handleArray | Select-Object Ucs,Dn,IfRole,LicState,Mode,OperState,OperSpeed,XcvrType | Where-Object {$_.OperState -eq "up"} | ConvertTo-Html -Fragment | Out-File ucsfiethportroles.htmlGet-Content ucsfiethportroles.html | Add-Content $ReportFile
############################################### Get Ethernet LAN Uplink Port Channel info #
##############################################Add-Content $ReportFile "Fabric Interconnect Ethernet Uplink Port Channels"Get-UcsUplinkPortChannel -Ucs $handleArray | Sort-Object -Property Ucs,Name | Select-Object Ucs,Dn,Name,OperSpeed,OperState,Transport | ConvertTo-Html -Fragment | Out-File ucsfiethpc.htmlGet-Content ucsfiethpc.html | Add-Content $ReportFile
############################################################## Get Ethernet LAN Uplink Port Channel port membership info #
-
8/18/2019 UCS HealthCheck v7.4
17/29
#############################################################Add-Content $ReportFile "Fabric Interconnect Ethernet Uplink Port Channel Members"Get-UcsUplinkPortChannelMember -Ucs $handleArray | Sort-Object -Property Ucs,Dn|Select-Object Ucs,Dn,Membership | ConvertTo-Html -Fragment | Out-File ucsfiethpcmembers.htmlGet-Content ucsfiethpcmembers.html | Add-Content $ReportFile
#################################### Get UCS QoS Class Configuration ####################################Add-Content $ReportFile "QoS System Class Configuration"Get-UcsQosClass -Ucs $handleArray | Select-Object Ucs,Priority,AdminState,Cos,Weight,Drop,Mtu | ConvertTo-Html -Fragment | Out-File ucsqossys.htmlGet-Content ucsqossys.html | Add-Content $ReportFile
######################### Get UCS QoS Policies #########################Add-Content $ReportFile "QoS Policies"Get-UcsQosPolicy -Ucs $handleArray | Select-Object Ucs,Dn,Name | ConvertTo-Html-Fragment | Out-File ucsqospol.htmlGet-Content ucsqospol.html | Add-Content $ReportFile
################################ Get UCS QoS vNIC Policy Map ################################Add-Content $ReportFile "QoS vNIC Policy Map"Get-UcsVnicEgressPolicy -Ucs $handleArray |sort-object -Property Prio | Select-Object UCS,Dn,Prio | ConvertTo-Html -Fragment | Out-File ucsqosvnicpol.htmlGet-Content ucsqosvnicpol.html | Add-Content $ReportFile
##################################### Get UCS Network Control Policies #####################################Add-Content $ReportFile "Network Control Policies"Get-UcsNetworkControlPolicy -Ucs $handleArray | Select-Object Ucs,Dn,Name,Cdp,Up
linkFailAction | ConvertTo-Html -Fragment | Out-File ucsnetctrlpol.htmlGet-Content ucsnetctrlpol.html | Add-Content $ReportFile
########################### Get UCS vNIC Templates ###########################Add-Content $ReportFile "vNIC Templates"Get-UcsVnicTemplate -Ucs $handleArray | Select-Object Ucs,Dn,Name,Descr,SwitchId,TemplType,IdentPoolName,Mtu,NwCtrlPolicyName,QosPolicyName | ConvertTo-Html -Fragment | Out-File ucsvnictemplts.htmlGet-Content ucsvnictemplts.html | Add-Content $ReportFile
##########################
# Get UCS Ethernet VLANs ###########################Add-Content $ReportFile "Ethernet VLANs"Get-UcsVlan -Ucs $handleArray | where {$_.IfRole -eq "network"} | Sort-Object -Property Ucs,Id | Select-Object Ucs,Id,Name,SwitchId | ConvertTo-Html -Fragment | Out-File ucsvlans.htmlGet-Content ucsvlans.html | Add-Content $ReportFile
########################################### Get UCS Ethernet VLAN to vNIC Mappings #
-
8/18/2019 UCS HealthCheck v7.4
18/29
##########################################Add-Content $ReportFile "Ethernet VLAN to vNIC Mappings"Get-UcsAdaptorVlan -Ucs $handleArray | sort-object Ucs,Dn |Select-Object Ucs,Dn,Name,Id,SwitchId | ConvertTo-Html -Fragment | Out-File ucsvnic2vlans.htmlGet-Content ucsvnic2vlans.html | Add-Content $ReportFile
################# End of Tab 7 #################Add-Content $ReportFile ""
################################ Tab 8, SAN Configuration ################################Add-Content $ReportFile ""
############################### Get UCS SAN Switching Mode ###############################Add-Content $ReportFile "Fabric Interconnect Fibre Channel Switching Mode"Get-UcsSanCloud -Ucs $handleArray | Select-Object Ucs,Rn,Mode | ConvertTo-Html -Fragment | Out-File ucsfifcmode.htmlGet-Content ucsfifcmode.html | Add-Content $ReportFile
################################################ Get UCS Fabric Interconnect FC Uplink Ports ################################################Add-Content $ReportFile "Fabric Interconnect FC Uplink Ports"Get-UcsFiFcPort -Ucs $handleArray | Select-Object Ucs,EpDn,SwitchId,SlotId,PortId,LicState,Mode,OperSpeed,OperState,wwn | sort-object -descending | where-object {$_.OperState -ne "sfp-not-present"} | ConvertTo-Html -Fragment | Out-File ucsfifcuplinkports.htmlGet-Content ucsfifcuplinkports.html | Add-Content $ReportFile
################################################### Get SAN Fiber Channel Uplink Port Channel info #
##################################################Add-Content $ReportFile "Fabric Interconnect FC Uplink Port Channels"Get-UcsFcUplinkPortChannel -Ucs $handleArray | Select-Object Ucs,Dn,Name,OperSpeed,OperState,Transport | ConvertTo-Html -Fragment | Out-File ucsfifcpc.htmlGet-Content ucsfifcpc.html | Add-Content $ReportFile
################################################## Get UCS Fabric Interconnect FCoE Uplink Ports ##################################################Add-Content $ReportFile "Fabric Interconnect FCoE Uplink Ports"Get-UcsFabricPort -Ucs $handleArray | Where-Object {$_.IfRole -eq "fcoe-uplink"} | Select-Object UCS,IfRole,EpDn,LicState,OperState,OperSpeed | ConvertTo-Html -Fragment | Out-File ucsfifcoeuplinkports.html
Get-Content ucsfifcoeuplinkports.html | Add-Content $ReportFile
########################################## Get SAN FCoE Uplink Port Channel info ##########################################Add-Content $ReportFile "Fabric Interconnect FCoE Uplink Port Channels"Get-UcsFabricFcoeSanPc -Ucs $handleArray | Select-Object Ucs,Dn,Name,FcoeState,OperState,Transport,Type | ConvertTo-Html -Fragment | Out-File ucsfifcoepc.htmlGet-Content ucsfifcoepc.html | Add-Content $ReportFile
-
8/18/2019 UCS HealthCheck v7.4
19/29
############################################# Get SAN FCoE Uplink Port Channel Members #############################################Add-Content $ReportFile "Fabric Interconnect FCoE Uplink Port Channel Members"Get-UcsFabricFcoeSanPcEp -Ucs $handleArray | Select-Object Ucs,Dn,IfRole,LicState,Membership,OperState,SwitchId,PortId,Type | ConvertTo-Html -Fragment | Out-File ucsfifcoepcmem.htmlGet-Content ucsfifcoepcmem.html | Add-Content $ReportFile
########################## Get UCS FC VSAN info ##########################Add-Content $ReportFile "FC VSANs"Get-UcsVsan -Ucs $handleArray | Select-Object Ucs,Dn,Id,FcoeVlan,DefaultZoning | ConvertTo-Html -Fragment | Out-File ucsvsans.htmlGet-Content ucsvsans.html | Add-Content $ReportFile
######################################### Get UCS FC Port Channel VSAN Mapping #########################################Add-Content $ReportFile "FC VSAN to FC Port Mappings"Get-UcsVsanMemberFcPortChannel -Ucs $handleArray | Select-Object Ucs,EpDn,IfType | ConvertTo-Html -Fragment | Out-File ucsvsanmap.html
Get-Content ucsvsanmap.html | Add-Content $ReportFile
########################### Get UCS vHBA Templates ###########################Add-Content $ReportFile "vHBA Templates"Get-UcsVhbaTemplate -Ucs $handleArray | Select-Object Ucs,Dn,Name,Descr,SwitchId,TemplType,QosPolicyName | ConvertTo-Html -Fragment | Out-File ucsvhbatemplts.htmlGet-Content ucsvhbatemplts.html | Add-Content $ReportFile
################################################### Get UCS WWNN/WWPN vHBA and adaptor Assignments #
##################################################Add-Content $ReportFile "vHBA Details"Get-UcsAdaptorHostFcIf -Ucs $handleArray | sort-object -Property Ucs,VnicDn -Descending | Select-Object Ucs,VnicDn,Vendor,Model,LinkState,SwitchId,NodeWwn,Wwn | Where-Object {$_.NodeWwn -ne "00:00:00:00:00:00:00:00"} | ConvertTo-Html -Fragment | Out-File ucsvhbadetails.htmlGet-Content ucsvhbadetails.html | Add-Content $ReportFile
################################## Get UCS vHBA to VSAN Mappings ##################################Add-Content $ReportFile "vHBA to VSAN Mappings"Get-UcsVhbaInterface -Ucs $handleArray | Select-Object Ucs,Dn,OperVnetName,Initi
ator | Where-Object {$_.Initiator -ne "00:00:00:00:00:00:00:00"} | ConvertTo-Html -Fragment | Out-File ucsvhbasanmap.htmlGet-Content ucsvhbasanmap.html | Add-Content $ReportFile
################# End of Tab 8 #################Add-Content $ReportFile ""
#######################################
-
8/18/2019 UCS HealthCheck v7.4
20/29
# Tab 9, UCS Environmental Statistics ########################################Add-Content $ReportFile ""
#################################### Get UCS chassis power usage stats ####################################Add-Content $ReportFile "Chassis Power Stats"Get-UcsChassisStats -Ucs $handleArray | Select-Object Ucs,Dn,InputPower,InputPowerAvg,InputPowerMax,InputPowerMin,OutputPower,OutputPowerAvg,OutputPowerMax,OutputPowerMin,Suspect | ConvertTo-Html -Fragment | Out-File ucschassispwrstats.htmlGet-Content ucschassispwrstats.html | Add-Content $ReportFile
##################################### Get UCS chassis and FI PSU status #####################################Add-Content $ReportFile "Chassis and Fabric Interconnect Power Supply Status"Get-UcsPsu -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,OperState,Perf,Power,Thermal,Voltage | ConvertTo-Html -Fragment | Out-File ucspsus.htmlGet-Content ucspsus.html | Add-Content $ReportFile
#############################
# Get UCS chassis PSU stats ##############################Add-Content $ReportFile "Chassis Power Supply Stats"Get-UcsPsuStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,AmbientTemp,AmbientTempAvg,Input210v,Input210vAvg,Output12v,Output12vAvg,OutputCurrentAvg,OutputPowerAvg,Suspect | ConvertTo-Html -Fragment | Out-File ucspsustats.htmlGet-Content ucspsustats.html | Add-Content $ReportFile
##################################### Get UCS chassis and FI fan stats #####################################Add-Content $ReportFile "Chassis and Fabric Interconnect Fan Stats"
get-ucsfan -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,Module,Id,Perf,Power,OperState,Thermal | ConvertTo-Html -Fragment | Out-Fileucsfanstats.htmlGet-Content ucsfanstats.html | Add-Content $ReportFile
############################################### Get UCS chassis IO Module (fex) temp stats ###############################################Add-Content $ReportFile "Chassis IO Module (FEX) Temperature Stats"Get-UcsEquipmentIOCardStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,AmbientTemp,AmbientTempAvg,Temp,TempAvg,Suspect | ConvertTo-Html -Fragment | Out-File ucsiomtempstats.htmlGet-Content ucsiomtempstats.html | Add-Content $ReportFile
#################################### Get UCS blade power usage stats ####################################Add-Content $ReportFile "Server Power Stats"Get-UcsComputeMbPowerStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,ConsumedPower,ConsumedPowerAvg,ConsumedPowerMax,InputCurrent,InputCurrentAvg,InputVoltage,InputVoltageAvg,Suspect | ConvertTo-Html -Fragment| Out-File ucschassispwr.htmlGet-Content ucschassispwr.html | Add-Content $ReportFile
-
8/18/2019 UCS HealthCheck v7.4
21/29
################################### Get UCS blade temprature stats ###################################Add-Content $ReportFile "Server Temperature Stats (in Celcius)"Get-UcsComputeMbTempStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,FmTempSenIo,FmTempSenIoAvg,FmTempSenIoMax,FmTempSenRear,FmTempSenRearAvg,FmTempSenRearMax,Suspect | ConvertTo-Html -Fragment | Out-File ucsbladetemps.htmlGet-Content ucsbladetemps.html | Add-Content $ReportFile
#################################### Get UCS Memory temprature stats ####################################Add-Content $ReportFile "Cisco Memory Temperature Stats (in Celcius)"Get-UcsMemoryUnitEnvStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,Temperature,TemperatureAvg,TemperatureMax,Suspect | ConvertTo-Html -Fragment | Out-File ucsmemtempstats.htmlGet-Content ucsmemtempstats.html | Add-Content $ReportFile
########################################### Get UCS CPU Power and temprature stats ###########################################Add-Content $ReportFile "Cisco CPU Power and Temperature Stats (in Celcius)<
/H2>"Get-UcsProcessorEnvStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn |Select-Object Ucs,Dn,InputCurrent,InputCurrentAvg,InputCurrentMax,Temperature,TemperatureAvg,TemperatureMax,Suspect | ConvertTo-Html -Fragment | Out-File ucscputempstats.htmlGet-Content ucscputempstats.html | Add-Content $ReportFile
################# End of Tab 9 #################Add-Content $ReportFile ""
#######################################
# Tab 10, UCS Ethernet Statistics ########################################Add-Content $ReportFile ""
############################################### Get UCS LAN Uplink Port Channel Loss Stats ###############################################Add-Content $ReportFile "Cisco LAN Uplink Port Channel Loss Stats"Get-UcsUplinkPortChannel -Ucs $handleArray | Get-UcsEtherLossStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,ExcessCollision,ExcessCollisionDeltaAvg,LateCollision,LateCollisionDeltaAvg,MultiCollision,MultiCollisionDeltaAvg,SingleCollision,SingleCollisionDeltaAvg | ConvertTo-Html -Fragment| Out-File ucsuplanlossstats.html
Get-Content ucsuplanlossstats.html | Add-Content $ReportFile
################################################## Get UCS LAN Uplink Port Channel Receive Stats ##################################################Add-Content $ReportFile "Cisco LAN Uplink Port Channel Receive Stats"Get-UcsUplinkPortChannel -Ucs $handleArray | Get-UcsEtherRxStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,BroadcastPackets,BroadcastPacketsDeltaAvg,JumboPackets,JumboPacketsDeltaAvg,MulticastPackets,MulticastPacketsDeltaAvg,TotalBytes,TotalBytesDeltaAvg,TotalPackets,TotalPacketsDeltaAvg,S
-
8/18/2019 UCS HealthCheck v7.4
22/29
uspect | ConvertTo-Html -Fragment | Out-File ucsuplanrxtats.htmlGet-Content ucsuplanrxtats.html | Add-Content $ReportFile
############################################### Get UCS LAN Uplink Port Channel Transmit Stats ###############################################Add-Content $ReportFile "Cisco LAN Uplink Port Channel Trasmit Stats"Get-UcsUplinkPortChannel -Ucs $handleArray | Get-UcsEtherTxStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,BroadcastPackets,BroadcastPacketsDeltaAvg,JumboPackets,JumboPacketsDeltaAvg,MulticastPackets,MulticastPacketsDeltaAvg,TotalBytes,TotalBytesDeltaAvg,TotalPackets,TotalPacketsDeltaAvg,Suspect | ConvertTo-Html -Fragment | Out-File ucsuplantxtats.htmlGet-Content ucsuplantxtats.html | Add-Content $ReportFile
####################### Get UCS vNIC Stats #######################Add-Content $ReportFile "vNIC Stats"Get-UcsAdaptorVnicStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,BytesRx,BytesRxDeltaAvg,BytesTx,BytesTxDeltaAvg,PacketsRx,PacketsRxDeltaAvg,PacketsTx,PacketsTxDeltaAvg,DroppedRx,DroppedRxDeltaAvg,DroppedTx,DroppedTxDeltaAvg,ErrorsTx,ErrorsTxDeltaAvg,Suspect | ConvertTo-Html -Fragment | Out-File ucsvnictats.htmlGet-Content ucsvnictats.html | Add-Content $ReportFile
################# End of Tab 10 #################Add-Content $ReportFile ""
############################# Tab 11, UCS FC Statistics #############################Add-Content $ReportFile ""
############################################### Get UCS FC Uplink Port Channel Loss Stats #
##############################################Add-Content $ReportFile "FC Uplink Port Stats"Get-UcsFcErrStats -Ucs $handleArray | Sort-Object -Property Ucs,Dn | Select-Object Ucs,Dn,CrcRx,CrcRxDeltaAvg,DiscardRx,DiscardRxDeltaAvg,DiscardTx,DiscardTxDeltaAvg,LinkFailures,SignalLosses,Suspect | ConvertTo-Html -Fragment | Out-File ucsfcuplinkstats.htmlGet-Content ucsfcuplinkstats.html | Add-Content $ReportFile
############################################### Get UCS FCoE Uplink Port Channel Stats ###############################################Add-Content $ReportFile "FCoE Uplink Port Channel Stats"Get-UcsEtherFcoeInterfaceStats -Ucs $handleArray | Select-Object UCS,DN,BytesRx,
BytesTx,DroppedRx,DroppedTx,ErrorsRx,ErrorsTx | ConvertTo-Html -Fragment | Out-File ucsfcoeuplinkstats.htmlGet-Content ucsfcoeuplinkstats.html | Add-Content $ReportFile
################# End of Tab 11 #################Add-Content $ReportFile ""
###########################
-
8/18/2019 UCS HealthCheck v7.4
23/29
# Tab 12, UCS Fault Report ############################Add-Content $ReportFile ""
########################################## Get all UCS Faults sorted by severity ##########################################Add-Content $ReportFile "Faults"Get-UcsFault -Ucs $handleArray | Sort-Object -Property Ucs,Severity -Descending| Select-Object Ucs,Severity,Created,Descr,dn | ConvertTo-Html -Fragment | Out-File ucsfaults.htmlGet-Content ucsfaults.html | Add-Content $ReportFile
################# End of Tab 12 #################Add-Content $ReportFile ""
Add-Content $ReportFile ""
#################################### Javascript to Activate the Tabs ####################################
Add-Content $ReportFile ""Add-Content $ReportFile "// Wrapped in a function so as to not pollute the global scope."Add-Content $ReportFile "var activatables = (function () {"Add-Content $ReportFile "// The CSS classes to use for active/inactive elements."Add-Content $ReportFile "var activeClass = 'active';"Add-Content $ReportFile "var inactiveClass = 'inactive';"Add-Content $ReportFile " "Add-Content $ReportFile "var anchors = {}, activates = {};"Add-Content $ReportFile "var regex = /#([A-Za-z][A-Za-z0-9:._-]*)$/;"Add-Content $ReportFile " "Add-Content $ReportFile "// Find all anchors (.)"
Add-Content $ReportFile "var temp = document.getElementsByTagName('a');"Add-Content $ReportFile "for (var i = 0; i < temp.length; i++) {"Add-Content $ReportFile " var a = temp[i];"Add-Content $ReportFile " "Add-Content $ReportFile " // Make sure the anchor isn't linking to another page."Add-Content $ReportFile " if ((a.pathname != location.pathname &&"Add-Content $ReportFile " '/' + a.pathname != location.pathname) ||"Add-Content $ReportFile " a.search != location.search) continue;"Add-Content $ReportFile " "Add-Content $ReportFile " // Make sure the anchor has a hash part."Add-Content $ReportFile " var match = regex.exec(a.href);"Add-Content $ReportFile " if (!match) continue;"
Add-Content $ReportFile " var id = match[1];"Add-Content $ReportFile " "Add-Content $ReportFile " // Add the anchor to a lookup table."Add-Content $ReportFile " if (id in anchors)"Add-Content $ReportFile " anchors[id].push(a);"Add-Content $ReportFile " else"Add-Content $ReportFile " anchors[id] = [a];"Add-Content $ReportFile "}"Add-Content $ReportFile " "Add-Content $ReportFile "// Adds/removes the active/inactive CSS classes dependi
-
8/18/2019 UCS HealthCheck v7.4
24/29
ng on whether the"Add-Content $ReportFile "// element is active or not."Add-Content $ReportFile "function setClass(elem, active) {"Add-Content $ReportFile " var classes = elem.className.split(/\s+/);"Add-Content $ReportFile " var cls = active ? activeClass : inactiveClass, found = false;"Add-Content $ReportFile " for (var i = 0; i < classes.length; i++) {"Add-Content $ReportFile " if (classes[i] == activeClass || classes[i] == inactiveClass) {"Add-Content $ReportFile " if (!found) {"Add-Content $ReportFile " classes[i] = cls;"Add-Content $ReportFile " found = true;"Add-Content $ReportFile " } else {"Add-Content $ReportFile " delete classes[i--];"Add-Content $ReportFile " }"Add-Content $ReportFile " }"Add-Content $ReportFile " }"Add-Content $ReportFile " "Add-Content $ReportFile " if (!found) classes.push(cls);"Add-Content $ReportFile " elem.className = classes.join(' ');"Add-Content $ReportFile "}"Add-Content $ReportFile " "Add-Content $ReportFile "// Functions for managing the hash."Add-Content $ReportFile "function getParams() {"
Add-Content $ReportFile " var hash = location.hash || '#';"Add-Content $ReportFile " var parts = hash.substring(1).split('&');"Add-Content $ReportFile " "Add-Content $ReportFile " var params = {};"Add-Content $ReportFile " for (var i = 0; i < parts.length; i++) {"Add-Content $ReportFile " var nv = parts[i].split('=');"Add-Content $ReportFile " if (!nv[0]) continue;"Add-Content $ReportFile " params[nv[0]] = nv[1] || null;"Add-Content $ReportFile " }"Add-Content $ReportFile " "Add-Content $ReportFile " return params;"Add-Content $ReportFile "}"Add-Content $ReportFile " "
Add-Content $ReportFile "function setParams(params) {"Add-Content $ReportFile " var parts = [];"Add-Content $ReportFile " for (var name in params) {"Add-Content $ReportFile " // One of the following two lines of code must be commented out. Use the"Add-Content $ReportFile " // first to keep empty values in the hash querystring; use the second"Add-Content $ReportFile " // to remove them."Add-Content $ReportFile " //parts.push(params[name] ? name + '=' + params[name] : name);"Add-Content $ReportFile " if (params[name]) parts.push(name + '=' + params[name]);"Add-Content $ReportFile " }"
Add-Content $ReportFile " "Add-Content $ReportFile " location.hash = knownHash = '#' + parts.join('&');"Add-Content $ReportFile "}"Add-Content $ReportFile " "Add-Content $ReportFile "// Looks for changes to the hash."Add-Content $ReportFile "var knownHash = location.hash;"Add-Content $ReportFile "function pollHash() {"Add-Content $ReportFile " var hash = location.hash;"Add-Content $ReportFile " if (hash != knownHash) {"Add-Content $ReportFile " var params = getParams();"
-
8/18/2019 UCS HealthCheck v7.4
25/29
Add-Content $ReportFile " for (var name in params) {"Add-Content $ReportFile " if (!(name in activates)) continue;"Add-Content $ReportFile " activates[name](params[name]);"Add-Content $ReportFile " }"Add-Content $ReportFile " knownHash = hash;"Add-Content $ReportFile " }"Add-Content $ReportFile "}"Add-Content $ReportFile "setInterval(pollHash, 250);"Add-Content $ReportFile " "Add-Content $ReportFile "function getParam(name) {"Add-Content $ReportFile " var params = getParams();"Add-Content $ReportFile " return params[name];"Add-Content $ReportFile "}"Add-Content $ReportFile " "Add-Content $ReportFile "function setParam(name, value) {"Add-Content $ReportFile " var params = getParams();"Add-Content $ReportFile " params[name] = value;"Add-Content $ReportFile " setParams(params);"Add-Content $ReportFile "}"Add-Content $ReportFile " "Add-Content $ReportFile "// If the hash is currently set to something that looks like a single id,"Add-Content $ReportFile "// automatically activate any elements with that id."Add-Content $ReportFile "var initialId = null;"
Add-Content $ReportFile "var match = regex.exec(knownHash);"Add-Content $ReportFile "if (match) {"Add-Content $ReportFile " initialId = match[1];"Add-Content $ReportFile "}"Add-Content $ReportFile " "Add-Content $ReportFile "// Takes an array of either element IDs or a hash withthe element ID as the key"Add-Content $ReportFile "// and an array of sub-element IDs as the value."Add-Content $ReportFile "// When activating these sub-elements, all parent elements will also be"Add-Content $ReportFile "// activated in the process."Add-Content $ReportFile "function makeActivatable(paramName, activatables) {"Add-Content $ReportFile " var all = {}, first = initialId;"
Add-Content $ReportFile " "Add-Content $ReportFile " // Activates all elements for a specific id (and inactivates the others.)"Add-Content $ReportFile " function activate(id) {"Add-Content $ReportFile " if (!(id in all)) return false;"Add-Content $ReportFile " "Add-Content $ReportFile " for (var cur in all) {"Add-Content $ReportFile " if (cur == id) continue;"Add-Content $ReportFile " for (var i = 0; i < all[cur].length; i++) {"Add-Content $ReportFile " setClass(all[cur][i], false);"Add-Content $ReportFile " }"Add-Content $ReportFile " }"Add-Content $ReportFile " "
Add-Content $ReportFile " for (var i = 0; i < all[id].length; i++) {"Add-Content $ReportFile " setClass(all[id][i], true);"Add-Content $ReportFile " }"Add-Content $ReportFile " "Add-Content $ReportFile " setParam(paramName, id);"Add-Content $ReportFile " "Add-Content $ReportFile " return true;"Add-Content $ReportFile " }"Add-Content $ReportFile " "Add-Content $ReportFile " activates[paramName] = activate;"
-
8/18/2019 UCS HealthCheck v7.4
26/29
Add-Content $ReportFile " "Add-Content $ReportFile " function attach(item, basePath) {"Add-Content $ReportFile " if (item instanceof Array) {"Add-Content $ReportFile " for (var i = 0; i < item.length; i++) {"Add-Content $ReportFile " attach(item[i], basePath);"Add-Content $ReportFile " }"Add-Content $ReportFile " } else if (typeof item == 'object') {"Add-Content $ReportFile " for (var p in item) {"Add-Content $ReportFile " var path = attach(p, basePath);"Add-Content $ReportFile " attach(item[p], path);"Add-Content $ReportFile " }"Add-Content $ReportFile " } else if (typeof item == 'string') {"Add-Content $ReportFile " var path = basePath ? basePath.slice(0) : [];"Add-Content $ReportFile " var e = document.getElementById(item);"Add-Content $ReportFile " if (e)"Add-Content $ReportFile " path.push(e);"Add-Content $ReportFile " else "Add-Content $ReportFile " return;"Add-Content $ReportFile " "Add-Content $ReportFile " if (!first) first = item;"Add-Content $ReportFile " "Add-Content $ReportFile " // Store the elements in a lookup table."Add-Content $ReportFile " all[item] = path;"
Add-Content $ReportFile " "Add-Content $ReportFile " // Attach a function that will activate theappropriate element"Add-Content $ReportFile " // to all anchors."Add-Content $ReportFile " if (item in anchors) {"Add-Content $ReportFile " // Create a function that will call the'activate' function with"Add-Content $ReportFile " // the proper parameters. It will be used as the event callback."Add-Content $ReportFile " var func = (function (id) {"Add-Content $ReportFile " return function (e) {"Add-Content $ReportFile " activate(id);"Add-Content $ReportFile " "
Add-Content $ReportFile " if (!e) e = window.event;"Add-Content $ReportFile " if (e.preventDefault) e.preventDefault();"Add-Content $ReportFile " e.returnValue = false;"Add-Content $ReportFile " return false;"Add-Content $ReportFile " };"Add-Content $ReportFile " })(item);"Add-Content $ReportFile " "Add-Content $ReportFile " for (var i = 0; i < anchors[item].length; i++) {"Add-Content $ReportFile " var a = anchors[item][i];"Add-Content $ReportFile " "Add-Content $ReportFile " if (a.addEventListener) {"
Add-Content $ReportFile " a.addEventListener('click', func, false);"Add-Content $ReportFile " } else if (a.attachEvent) {"Add-Content $ReportFile " a.attachEvent('onclick', func);"Add-Content $ReportFile " } else {"Add-Content $ReportFile " throw 'Unsupported event model.';"Add-Content $ReportFile " }"Add-Content $ReportFile " "Add-Content $ReportFile " all[item].push(a);"
-
8/18/2019 UCS HealthCheck v7.4
27/29
Add-Content $ReportFile " }"Add-Content $ReportFile " }"Add-Content $ReportFile " "Add-Content $ReportFile " return path;"Add-Content $ReportFile " } else {"Add-Content $ReportFile " throw 'Unexpected type.';"Add-Content $ReportFile " }"Add-Content $ReportFile " "Add-Content $ReportFile " return basePath;"Add-Content $ReportFile " }"Add-Content $ReportFile " "Add-Content $ReportFile " attach(activatables);"Add-Content $ReportFile " "Add-Content $ReportFile " // Activate an element."Add-Content $ReportFile " if (first) activate(getParam(paramName)) || activate(first);"Add-Content $ReportFile "}"Add-Content $ReportFile " "Add-Content $ReportFile "return makeActivatable;"Add-Content $ReportFile "})();"Add-Content $ReportFile " "Add-Content $ReportFile "activatables('page', ['page-1', 'page-2', 'page-3','page-4','page-5','page-6','page-7','page-8','page-9','page-10','page-11','page-12']);"
Add-Content $ReportFile ""Add-Content $ReportFile ""
###################### Remove temp files ######################Remove-Item ucsfis.htmlRemove-Item ucsfi-inv.htmlRemove-Item ucschassis-inv.htmlRemove-Item ucsiom-inv.htmlRemove-Item ucsserver-inv.htmlRemove-Item ucsadaptor-inv.htmlRemove-Item ucsservercpu-inv.html
Remove-Item ucsservermemory-inv.htmlRemove-Item ucsclusterconfig-inv.htmlRemove-Item ucschassisdisc-pol.htmlRemove-Item ucschassispower-pol.htmlRemove-Item ucscluster.htmlRemove-Item ucsmfirmwarever.htmlRemove-Item ucsfiethmode.htmlRemove-Item ucsfifcmode.htmlRemove-Item ucsfiethportroles.htmlRemove-Item ucsfichassisiommap.htmlRemove-Item ucsfifcuplinkports.htmlRemove-Item ucsfifcpc.htmlRemove-Item ucsfiethpc.html
Remove-Item ucsfiethpcmembers.htmlRemove-Item ucsorgs.htmlRemove-Item ucsnativeauth.htmlRemove-Item ucsldapproviders.htmlRemove-Item ucsldapgroupmaps.htmlRemove-Item ucsuserroles.htmlRemove-Item ucsdnsservers.htmlRemove-Item ucsntpservers.htmlRemove-Item ucstimezone.htmlRemove-Item ucsippoolblocks.html
-
8/18/2019 UCS HealthCheck v7.4
28/29
Remove-Item ucscimcpooladdr.htmlRemove-Item ucsuuidpool.htmlRemove-Item ucsuuidpoolblocks.htmlRemove-Item ucsuuidpooladdr.htmlRemove-Item ucsmacpools.htmlRemove-Item ucsmacpoolblocks.htmlRemove-Item ucsmacpooladdr.htmlRemove-Item ucswwnpools.htmlRemove-Item ucswwnpooladdr.htmlRemove-Item ucsserverpools.htmlRemove-Item ucsserverpoolassigned.htmlRemove-Item ucsqossys.htmlRemove-Item ucsqospol.htmlRemove-Item ucsnetctrlpol.htmlRemove-Item ucsvnictemplts.htmlRemove-Item ucsvhbatemplts.htmlRemove-Item ucsvhbasanmap.htmlRemove-Item ucschassispwr.htmlRemove-Item ucschassispwrstats.htmlRemove-Item ucsbladetemps.htmlRemove-Item ucsmemtempstats.htmlRemove-Item ucscputempstats.htmlRemove-Item ucsfanstats.htmlRemove-Item ucspsus.html
Remove-Item ucspsustats.htmlRemove-Item ucsuplanlossstats.htmlRemove-Item ucsuplanrxtats.htmlRemove-Item ucsuplantxtats.htmlRemove-Item ucsvnictats.htmlRemove-Item ucsfcuplinkstats.htmlRemove-Item ucsfaults.htmlRemove-Item ucssptemplts.htmlRemove-Item ucssps.htmlRemove-Item ucsvlans.htmlRemove-Item ucsvsans.htmlRemove-Item ucsvsanmap.htmlRemove-Item ucsfilic-inv.html
Remove-Item ucscallhomecnfg.htmlRemove-Item ucscallhomesmtpsrv.htmlRemove-Item ucscallhomerecipients.htmlRemove-Item ucscallsnmpcfg.htmlRemove-Item ucsvhbadetails.htmlRemove-Item ucsvnic2vlans.htmlRemove-Item ucsiomtempstats.htmlRemove-Item ucsdiskcontroller-inv.htmlRemove-Item ucsserverdisks-inv.htmlRemove-Item ucsfifirmwarever.htmlRemove-Item ucsiomfirmwarever.htmlRemove-Item ucscimcfirmwarever.htmlRemove-Item ucsadaptorfirmwarever.html
Remove-Item ucsbiosver.htmlRemove-Item ucssanbootpol.htmlRemove-Item ucsvnicorder.htmlRemove-Item ucsqosvnicpol.htmlRemove-Item ucsbiospols.htmlRemove-Item ucsbios-settings.htmlRemove-Item ucsfifcoeuplinkports.htmlRemove-Item ucsfifcoepc.htmlRemove-Item ucsfifcoepcmem.htmlRemove-Item ucsippools.html
-
8/18/2019 UCS HealthCheck v7.4
29/29
Remove-Item ucsmaint.htmlRemove-Item ucshostfirmwarepackage.htmlRemove-Item ucsdiskpolicy.htmlRemove-Item ucsscrubpolicy.htmlRemove-Item ucsfaultpol.htmlRemove-Item ucssyslogremote.htmlRemove-Item ucsyslogsources.htmlRemove-Item ucsyslogfile.htmlRemove-Item ucsfullbackup.htmlRemove-Item ucsallcfgbackup.htmlRemove-Item ucsadaptorext-inv.htmlRemove-Item ucsmgmtmon-pol.htmlRemove-Item ucsfcoeuplinkstats.html
####################### E-mail HTML output #######################if ($enablemail -match "yes"){$msg = new-object Net.Mail.MailMessage$att = new-object Net.Mail.Attachment($ReportFile)$smtp = new-object Net.Mail.SmtpClient($smtpServer)$msg.From = $mailfrom$msg.To.Add($mailto)
$msg.Subject = Cisco UCS Health Check$msg.Body = Cisco UCS Health Check, open the attached HTML file to view the report.$msg.Attachments.Add($att)$smtp.Send($msg)
######################## Disconnect from UCSM########################
Disconnect-Ucs}