I’ve been playing the the “hurry up and wait” game today and decided to teach myself something new. We have need of a central web page with links to blade chassis On Board Administrator and server ILO management pages. I got a script working to take what we had in a text file and create a list in SharePoint 2007 using powershell and the wonderful stsadm extensions, but I still need a way to auto maintain that list.

After doing some searching online (mainly this posting: http://stackoverflow.com/questions/1819341/how-to-read-xml-file-from-web-using-powershell) I found out that you can actually parse through some of the XML config used for ILO and OBA. I also didn’t know that ilo makes some of this information available without authentication. For example, point a web browser at an ILO interface using the following:

http://ilo-address/xmldata?item=All

You will get an XML document with the server’s serial number, model, rack location (if set), and blade enclosure name, to name a few of the cooler things. To access that information using powershell you need to create a new xmldocument object.

$doc = New-Object System.Xml.XmlDocument
$doc.Load(“http://ilo-address/xmldata?item=All”)

You can then list out the properties with the following:

$doc.RIMP.INFRA2.BLADES.BLADE get-member

Although viewing the xml in a web browser shows the XML in a little more friendly way. you can then display the information using a simple write-host.

Write-Host $doc.RIMP.HSI.SPN #gets server type
Write-Host $doc.RIMP.HSI.SBSN #gets serial
Write-Host $doc.RIMP.BLADESYSTEM.BAY #chassis slot
Write-Host $doc.RIMP.BLADESYSTEM.MANAGER.RACK #Rack location

All together it would look like this.

$doc = New-Object System.Xml.XmlDocument
$doc.Load(“http://ilo-address/xmldata?item=All”)

Write-Host $doc.RIMP.HSI.SPN #gets server type
Write-Host $doc.RIMP.HSI.SBSN #gets serial
Write-Host $doc.RIMP.BLADESYSTEM.BAY #chassis slot
Write-Host $doc.RIMP.BLADESYSTEM.MANAGER.RACK #Rack location

The one thing I can’t figure out is how to get the actual server name. If anyone has an idea on how to do that please leave a comment.

Alternatively you can do the same thing with the HP onboard adminstrator on C series chassis.

$doc = New-Object System.Xml.XmlDocument
$doc.Load(“http://oba-address/xmldata?item=All”)

$doc.RIMP.INFRA2.BLADES.BLADE FT -autosize

The above returns usefull things like the ILO IP for all blades in the chassis, blade serial numbers, and hardware models.

There is a lot more information in the XML configs. It was kinda fun playing around with this. Seriously though if anyone knows how to get the server name remotely from a command prompt using the ilo interface, let me know.