I’m glad to say HPE have released them now as a module in the PowerShell Gallery. If you have the previous version installed uninstall the program. You can then go to a PowerShell session (ran as an Administrator) and install from the gallery:

Let’s look at what we did. First of all we set an IP range we scan for iLOs to respond on. I keep my iLOs on a defined range of addresses such as 10.10.1.100-120. Next we are only interested in iLO 4’s so we define the type in $iLOType. Valid entries are:

Integrated Lights-Out 3 (iLO 3)

Integrated Lights-Out 4 (iLO 4)

Integrated Lights-Out 5 (iLO 5)

Next we define the iLO version we want to upgrade to (2.60 is the latest available) and where we are storing the downloaded firmware file.

Finally we store some credentials. Username is a plain text but we need to store the password as a secure string. Next we combine the username and password to create a credential object. This will be used later to connect to the iLOs.

Find the iLOs to Update

Next up is to find the servers we need to update and put them into a variable:

I’m going to break that down. First of all we are going to put the list of iLOs to update into a variable called $foundServers. We use the cmdlet Find-HPEiLO to do this. We pass it the -Range of IP’s we want to scan, which we defined as the variable $iLOs. From all the servers that respond in the list we only want to select the ones requiring a firmware update.

First we only find iLO 4’s so we use Where-Object -Property PN -EQ $iLOType. We are saying to only choose iLOs where the iLO Property Part Number, PN is equal -EQ to the variable $iLOType. Next we refine this list even further. We check the firmware version property FWRI and find where that is not equal NE to the firmware version defined in the variable $firmwareVersion.

If you want to check which servers it found, just type in $foundServers and it will list all the servers identified.

Connecting to the iLOs

Now we have a list of the servers in the variable $foundServers we need to connect to them. We use the cmdlet Connect-HPEiLO:

We are creating another variable $connection and passing to it the connected iLOs. We use pipe the list of iLOs, $foundServers to Connect-HPEiLO. We send the credential object we created earlier for authentication. Note if you don’t have the iLOs signed by a valid certificate you will need to add the parameter -DisableCertificateAuthentication.

So we now have a connection setup to all the iLOs that need an update.

Conclusion

As you can see with a few simple commands you can automate the installation across many iLOs at the same time. Why waste time manually logging into each iLO web console and pushing the firmware. Automate all the things.