iLO admin password changes en masse

Worked on this the other day, very handy!

Need to change all the admin passwords for iLO.  It's okay if the passwords are the same, just has to be complex.  Note also there is a 20-char limit for IPMI 2.0 (recommended, not enforced).

Batch file
I created a batch file and server list file for each domain to keep things simple.  Note if the path has spaces, you need to enclose with quotes.  :P

 set FILE=server_list_test.txt

 for /F "skip=2 tokens=1,2,3*" %%i in (%FILE%) do (
  echo %%i
  psexec \\%%i -u %%j -p %%k -h -c hponcfg.exe /f \\testserver.test.local\F$\temp\ilo_password.xml

Quick breakdown of what it's doing:
* '-c hponcfg.exe' is in here because '-w' to set local working directory doesn't seem to work, so we copy the exe over
* '-h' is for Vista and up, elevates the cmd
* '/f' specifies the location of the ilo xml file
* Note there are separate source text files for each domain, and separate XML locations due to cross-domain privilege limitations.

Batch source file
Use tab spacing.
Target(I) Username(J) NewPassword(K)
 testexch01.testlab.local TEST\ctrotter Password01
 testexch02.testlab.local TEST\ctrotter Password01

Note - use notepad++ to edit/create this to preserve XML formatting.  I used the template/sample XML file from HP (

Sorry, had to remove the leading '<' from every line for it to display properly.

   LOGIN USER_LOGIN="adminname" PASSWORD="password">
      USER_INFO MODE="write">
         MOD_USER USER_LOGIN="Administrator">
            PASSWORD value="eyeNEEDremoteaccess!"/>



Popular posts from this blog

DFSR - eventid 4312 - replication just won't work

Fixing duplicate SPNs (service principal name)

Logstash to Nagios - alerting based on Windows Event ID