Have you tried HP iLO Powershell Cmdlets? Scripting Tools for Windows PowerShell | HPE™
These are really cool and much easier to collect iLO info.
There is a readymade cmdlet for iLO firmware version:
PS C:\> get-help Get-HPiLOFirmwareVersion -Examples
NAME
Get-HPiLOFirmwareVersion
SYNOPSIS
Gets the iLO firmware version.
-------------------------- EXAMPLE 1 --------------------------
PS C:\> Get-HPiLOFirmwareVersion
Please enter Server IP or Hostname: 1.4.217.131,187
Do you want to add details for another server?(Y/N) : y
Please enter Server IP or Hostname: 1.4.209.53
Do you want to add details for another server?(Y/N) : n
Username is not provided for the following iLO Server(s):
1.4.217.131
1.4.217.187
1.4.209.53
Use same Username for these servers? (Y/N) : N
Enter Username for 1.4.217.131: administrator
Enter Username for 1.4.217.187: alansmith
Enter Username for 1.4.209.53: timhorton
Password is not provided for the following iLO Server(s):
1.4.217.131
1.4.217.187
1.4.209.53
Use same Password for these servers? (Y/N) : N
Enter Password for 1.4.217.131: ************
Enter Password for 1.4.217.187: ************
Enter Password for 1.4.209.53: ************
IP : 1.4.217.131
HOSTNAME : iloqwc.company.net
STATUS_TYPE : OK
STATUS_MESSAGE : OK
FIRMWARE_DATE : Aug 28 2012
FIRMWARE_VERSION : 1.50
LICENSE_TYPE : iLO 3 Advanced
MANAGEMENT_PROCESSOR : iLO3
IP : 1.4.217.187
HOSTNAME : ilo.company.net)
STATUS_TYPE : OK
STATUS_MESSAGE : OK
FIRMWARE_DATE : Jan 20 2012
FIRMWARE_VERSION : 1.50
LICENSE_TYPE : iLO 3 Advanced
MANAGEMENT_PROCESSOR : iLO3
IP : 1.4.209.53
HOSTNAME : ilomxq.company.net
STATUS_TYPE : OK
STATUS_MESSAGE : OK
FIRMWARE_DATE : Mar 5 2012
FIRMWARE_VERSION : 1.60
LICENSE_TYPE : iLO 4 Advanced
MANAGEMENT_PROCESSOR : iLO4
This command shows a basic usage scenario where only the cmdlet name is entered. You are asked if the same credentials are to be used for multiple input servers or if separate credentials have to be collected for each server. Then you are asked if the same values for parameters are to be passed to the cmdlets or separate parameters are going to be used for each server. A list of iLO details is passed to the cmdlet in the form of PowerShell object or list of PowerShell objects or list of IP addresses of the iLO.