Sometimes, you want to have more info then the GUI shows you, or you want to create or change configuration on loads of different servers, and clicking is not the fastest way. Command line and scripting tools always have been a nice way to automate things or to retrieve valuable information that can’t be found in the GUI. This was also the case with one of my customers, from which we wanted to retrieve the license keys to reuse in other servers. So here a quick post, on how you can use the Command Line to connect and retrieve info from the ILO’s of HP servers. Quite handy skillset to have as an IT consultant 😉.
Step 1: Download the ILO utility:
First download the “Lights-Out Configuration Utility (HPQLOCFG.EXE)” from the HPE server.
I downloaded it through this link. It possible that the link will be changed in future, since this happends a lot on the HPE website, but a quick google search on “HPQLOFCG.EXE”, will probably help you as well. The .exe will most probably installed by default into the folder “c:\Program Files <x86>\HP Lights-Out Configuration Utility”. If you change it, make sure you note where you install it since you’ll need it later.
This tool works on ILO 2.41 (as Have I tested) till version 3 and 4, according to the website of HPE.
Step 2: Download the Command Line Guide
The guide from HPE is quite useful and easy to use if you know how to use it. The guide can be found here. In case the link is changed in the future as well, search for “HPE ILO 4 Scripting and Command Line Guide”. With this guide you can found the command line for retrieving info like license keys or create new users for example.
In our example we’re going to retrieve the ILO keys.
Step 3: Create an xml input file for the tool to use
Browse to the section that you are interested in, and “copy-paste“ the code into a notepad.
Save the notepad as an xml file and give it a fitting name.
In our example we’re going to use the command for retrieving license keys, which we found in the guide.
So the input from our file is this:
<RIBCL VERSION="2.0"> <LOGIN USER_LOGIN="USERNAME" PASSWORD="PASSWD"> <RIB_INFO MODE="read"> <GET_ALL_LICENSES/> </RIB_INFO> </LOGIN> </RIBCL>
Step 4: Retrieving info with “HPQLOCFG.EXE”
Open up CMD and go to the installed directory, which by default is “c:\Program Files <x86>\HP Lights-Out Configuration Utility” or “C:\Program Files (x86)\Hewlett-Packard\HP Lights-Out Configuration Utility”. Copy the input file for simplicity to the same folder and use the following command, without the < > characters.
C:\Program Files (x86)\Hewlett-Packard\HP Lights-Out Configuration Utility>HPQLOCFG.exe -s <ILO IP> -l <Name OutputFile> -f <Input.xml> -u <USERNAME Ilo> -p <PASSWD Root>
This will generate an output file that contains the info, but it will also show on your cmd screen.
Thanks to my colleague Kabir Ali, who helped me finding this valuable information.
Samir is the author of vSAM.Pro & a Life enthusiast who works as a consultant in the field of IT. With a great passion for Tech & Personal Development, he loves to help people with their problems, but also inspire them with a positive outlook on life.
Besides that, he is also a big Sport & Music junky that loves to spend a big chunk of his time on producing music or physically stretching himself.
2 thoughts on “Retrieving License Keys and other Valuable information from HPE Servers”
thank you for this powerfull post, do you know how to configure Smart Storage array using this tool?
Sorry for the late reply, but I’m currently quite busy with some family matters.
The links that are provided in this posts, contain the documents that explain or deep-dive on the command line of the ILO. I did a quick search in the cmd document and found some storage commands. So probably there should be some commands that you can use for your storage array.
Since I don’t have any HPE storage equipment anymore, I cannot test this for you.
So if you feel uncertain definitely ask HPE Support to validate the things that you want to achieve.