This is a script I have been meaning to post for a while now.
HP do not have any good way to bulk manage iLO devices. If you want to update iLOs you either use the web interface, or the config tools that can be run from the local machine using the RIBCL language. Finally, theres the locfg.pl that ships with the HP Scripting samples, which once again uses RIBCL. This might be ok when you only have a dozen machines to deal with, but when you have over 150 servers, you needed a better way. Building a linux host just to run locfg.pl in a bash/tcsh script was not an option.
So I wrote a powershell script that acts as a wrapper to locfg.pl
You can download it here. I suggest reading on for further details
Your script host machine does require you to have ActivePerl installed. There may be additional modules required by ActivePerl to run locfg.pl please follow the ActivePerl Documentation on how to add these.
To run, unzip the files to a location, and edit the configuration variables at the top of the script. If using a text file to enumerate iLO devices, simply add 1 host per line to the text file. if using DNS, it should be fairly self explanatory.
This script is invoked by running:
Where MyConfig.XML is the name of the RIBCL configuration/command file you have prepared. I have left a sample xml file there that will log in to an iLO (after credentials are edited). For more information, Please read the HP Lights Out Scripting Guide.
The script itself is silent while running, and will output a summary report to screen or to file when complete. If the script terminates while processing, all report data will be lost. The summary will advise if the iLO settings were successfully applied, if an error occurred or if the iLO could not be contacted.
Be aware that the error messages are the output of the iLO device – and therefore the error messages are that of HP…which can be vague at times.
HP Bladesystem OAs will not like this script. They are unable to understand RIBCL as delivered by the locfg.pl script and will cause the powershell script to hang. Ideally, your OAs will have a different FQDN to that of your iLO devices.
Anyway, I hope that people find this useful. Happy to respond to comments/queries 🙂