Powershell Script – Bulk iLO License grabber

Yesterday I promised a nice Powershell script. Here it is,

Make sure you edit the appropriate variables in this script before running, otherwise it will not work. Additionally it does assume that you use hostnames to reference your iLO interfaces rather than IPs. (you do use Host Names right? how do you remember the IPs of 100+ iLO interfaces?).

Notes about the code:
I have used James Brundage’s Code for the get-web function. It seemed easier to use someone elses code than spend half a day working it out myself.

This was my first experience with XML Handling with Powershell, and let me just say it’s beautiful. I will post another script in the future that extends a little more into XML, but looking at the code it is rather intuitive.

Quite simply, the code reads a text file of hostnames in as a variable, and then foreach hostname gets the XML result from the URL mentioned in my Previous Post. The script will then do a little bit of cleaning up of the result so it is well-formed XML before inserting useful information into a CSV file. In my case, it was useful to know the hostname of the iLO device, it’s Serial Number, and the Activation key.

Hopefully people may find a use for this 🙂