Tuesday, April 1, 2014

Working with HP ILO using PowerShell

Hi,

We needed to change password for one user for some hundreds of ESXi servers and task was distributed among the team and each person got nearly 50 servers. If you know me there was no way(may be last way) I was going to each ILO ip and change password for each ESXi server.

So I did a little google search and found that HP released a  module for HP ILO that can be downloaded from here HP ILO Cmdlets.     And i just want to clear that this module does not depend on what is the operating system installed on target server, it may be Unix, ESXi or Windows, it does not matter.

HP ILO Cmdlets support ILO v3 and ILO v4 (ILO v1 and ILO v2 are not supported) and you need at least powershell v2 to get this module to work(infact Powershell v1 does not support any Module, only PSSnapins)

After installing you will be getting a powershell module that you can findout by using
PS > Get-Module -ListAvailable



Once you are able to see the module, import the module in current session using
PS > Import-Module HPiLOCmdlets

Best part it this module is a script module, so you can just go to the module where it is installed and you can open HPiLOCmdlets.psm1 in notepad and find out how all fucntions are defined in module.

 












And it give you total of 110 Functions to work with.





So back to my problem, fortunately most of our servers were HP, so I took the charge of task and use below  command to reset the user

PS>Get-Content Servers.txt | foreach{ Set-HPiLOUser -Username username -Password password -UserLoginToEdit testuser -NewPassword newpassword}

So i get all ILO ips from Servers.txt and pipe it to Set-HPiloUser function and here username and pasword are for logging into the ILO, testuser is the user for which we want to change the password and newpassword will be obviously new password you want to set.

Actually you can find better help (I agree, much better help) if you would use
PS > Help  Set-HPiLOUser -Full

You can do much more with Set-HPiLOUser and even more with whole module.




Happy Scripting!!!



20 comments:

  1. Is there anyway to do this without the current administrator password?

    ReplyDelete
  2. You need to have admin or another user's password which has equivalent access to use this module.....

    ReplyDelete
  3. Hi, probably our entry may be off topic but anyways, I have been surfing around your blog and it looks very professional. It’s obvious you know your topic and you appear fervent about it. I’m developing a fresh blog plus I’m struggling to make it look good, as well as offer the best quality content. I have learned much at your web site and also I anticipate alot more articles and will be coming back soon. Thanks you.


    12.hp.com/setup UK

    ReplyDelete
  4. Thanks so much for the comment. I try to put together my learning and experiece in terms of blog and feel great if this helps others.


    hp envy 4520 scan to computer

    ReplyDelete
  5. If you think not finding the Roku com link code is the end of the world to you, here’s to reading more. Using a single account, you can manage the entire Roku device, which is one of the best parts of this system.

    ReplyDelete
  6. We routinely fix all LED TV problems like the panel check bar, weak contrast in the picture, sparking picture, low and distorted sound, no light but sound ok, volume up or down not functioning etc. Avoid all disputes by consulting the best LG TV Service Center in Mumbai. At Relife Center, we provide quality TV repairing service at low prices.

    ReplyDelete
  7. Garmin express update also has to be checked from time to time to ensure the application's optimum functionality. Using Garmin.com/Express is not tricky as it seems to be. It’s just that you need to follow all steps in proper sequence. If you do this, installing Garmin Express will be a smooth process.

    ReplyDelete
  8. Being a machinery device, different technical faults could arise during print jobs. There are so many general printer issues that multiple users may be confronting continuously and so need quick support to fix them 123 hp com dj3630.

    ReplyDelete
  9. I am confronting issues in this process, so I need to take the unique help from an online technician. So anyone can assist me to set up an 123.hp.com/ojpro8710 HP wireless printer via

    ReplyDelete
  10. Thanks for sharing this information.

    If you want hp smart app download and setup instrctions. Please visit our blog, to learn about easily.

    ReplyDelete