If you’ve had any chance to use the HP Scripting Tools for Powershell at all you might have noticed some inconsistencies specific to the handling of server names. These issues are only made worse when combined with blade enclosures. The biggest example to illustrate this is by using the get-hpiloservername cmdlet: Get-HPiLOServerName Output

Now by going to the login screen of the iLO Management page we see: HP iLO Management Page

Since this is a blade, let’s also see what the Onboard Administrator (OA) Device Bay Summary page says: HP OA Output

According to the get-hpiloservername output the standard name should be updated to match that everywhere else. The setting in the GUI that we’re looking for is the “iLO Subsystem Name (Host Name)” which is located by way of the Network –> iLO Dedicated Network Port –> General tab area: iLO Subsystem Name

Instead of reverse engineering the HP module, there’s a workaround available by way of the set-hpilonetworksetting, specifically the DNSName parameter. An example:

Set-HPiLONetworkSetting -Server '10.10.10.10' -DNSName 'newserver10' -Credentials (Get-Credential)

One big thing to note, this command does perform a reset against the iLO so if you’re connected to the iLO you will be kicked out and greeted by the following message: iLO Reset

After the iLO finishes being reset, you can refresh the page and see the newly configured name: HP iLO Management Page

Then returning to the OA Device Summary page: HP OA Output

The next logical question is how to automate this process…

That’s easy enough! Let’s check out a section of IPs that are not yet configured with the get-hpilonetworksetting cmdlet: iLO Hostname Output

Before we run the script, there are some assumptions this script makes:

  • You have the HP Scripting Tools for Powershell modules already installed.
  • You’re running Powershell version 4.0. That’s a requirement for the resolve-dnsname cmdlet to work.
  • DNS entries have already been made and are resolvable.
  • The login credentials are the same for all the iLO systems.

Making sure those bases are all covered it’s time to run the script: Script output will appear similar to the following: (Note the differences in output) Script Output

After giving it a minute or two for the iLO resets to be performed, we’ll check out the names again: iLO Hostname Output

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.