Get HP iLO board informations using XML

The purpose of this script is to retrieve the following HP iLO board informations : HP Server model, iLO model, iLO firmware version. You only need a host file filled in with all your iLO IP addresses. The script has been tested successfully with HP iLO version version 4. The main steps are the following :
– ping the iLO ip addresses listed in the host file
– if the ping is successful, read the iLO XML file that contains the informations

The output show in this order : iLO firmware version, iLO IP address, HP Server model, iLO model

Script :

$hosts = Get-Content c:\Temp\hosts.txt
foreach ($Hostname in $hosts) {
	$PingStatus = Gwmi Win32_PingStatus -Filter "Address = '$Hostname'" | Select-Object StatusCode
	If ($PingStatus.StatusCode -eq 0){
		$url = "http://$Hostname/xmldata?item=All"
		$feed=[xml](new-object system.net.webclient).downloadstring($url)
		$feed.RIMP.mp.fwri + "`t" + $Hostname + "`t" + $feed.RIMP.hsi.spn + "`t" + $feed.RIMP.mp.pn
	}
}
<>

External references
HP Scripting tools for Windows Powershell
Are you looking for a way to automate your HP Server configuration tasks? HP Scripting Tools for Windows PowerShell is a powerful set of utilities that can be used to perform various configuration tasks on HP Servers. Windows PowerShell is Microsoft’s task automation framework, consisting of a command-line shell and associated scripting language built on .NET Framework. HP Scripting Tools for Windows PowerShell provides a simplified and consistent infrastructure management experience.

They follow the standard PowerShell syntax and scripting model, making it easy for customers to incorporate these functions into their administrative scripts. HP Integrated Lights-Out (iLO) and HP Onboard Administrator for HP BladeSystem Enclosures provide a comprehensive set of HP integration tools designed for IT experts in PowerShell scripting to configure a HP Server.

Get HP iLO board informations using XML

Leave a Reply

Your email address will not be published.