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.
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:
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)
The next logical question is how to automate this process… That’s easy enough!
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:
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.