HPE OneView
cancel
Showing results for 
Search instead for 
Did you mean: 

Changing multiple ILO password on Proliant servers

 
Highlighted
Occasional Contributor

Changing multiple ILO password on Proliant servers

Can multiple ILO passwords get changed within HPOneView? Can it be done with XML or a powershell script?

6 REPLIES 6
Highlighted
Respected Contributor

Re: Changing multiple ILO password on Proliant servers

You can manage the iLO users with a server profile template.  You change the administrator account, add more local accounts, connect to LDAP/AD and set up LDAP/AD groups with various access levels.  Is that what you were after?

Highlighted
Occasional Contributor

Re: Changing multiple ILO password on Proliant servers

I was really wanting some kind of script because I don't have OneView license for all my servers

Highlighted
Respected Contributor

Re: Changing multiple ILO password on Proliant servers

Well, not from one place, but from each host, you can use hponcfg to change user password in iLO.  hponcfg is available for both Linux, Windows, and ESXi.

Highlighted
Occasional Contributor

Re: Changing multiple ILO password on Proliant servers

I have almost 400 Servers I really don't want to chance each host manually

Highlighted
Respected Contributor

Re: Changing multiple ILO password on Proliant servers

Do you have salt or ansible setup on your servers?  If so, you can use that to run hponcfg on each server from a central location.  You would have to consult with HPE.  I'm not sure you need licensed mode to change iLO passwords, but you might?  Note with hponcfg, if your iLO is running in production mode, then you can run it from the root account without having to know the current iLO administrator password.  If your iLO is one of the higher security modes, then you will need to know the current iLO administrator password.

Highlighted
Frequent Advisor

Re: Changing multiple ILO password on Proliant servers

Import-Module HPEiLoCmdlets
$iLo_Inventory_File = "iLo-Inventory.txt"
$Results_File = "pswd-change-results.txt"
IF (Test-Path $Results_File)
{ Remove-Item $Results_File }

$Target_List = Get-Content $iLo_Inventory_File
ForEach ($Target_iLo in $Target_List)
{
$Connected_iLo = Connect-HPEiLO -IP $Target_iLo -Username 'localAdminIDgoeshere' -Password 'pswdgoeshere' -DisableCertificateAuthentication
IF ($Connected_iLo -eq $null) # -ErrorAction Stop was not capturing this situation!
{
$Text_Line = $Target_iLo + ';DID NOT ACCEPT THE CONNECTION REQUEST'
Out-File -FilePath $Results_File -Encoding ascii -InputObject $Text_Line -Append
Continue
}

$Result1 = Set-HPEiLoUser -Connection $Connected_iLo -LoginName TargetID -NewPassword "newPSWDhere" `
-OutputType Object -ErrorAction Stop

$Text_Line = $Target_iLo + ';' + $Result1.Hostname + ';' + $Result1.Status + ';' + $Result1.StatusInfo.Message + ';' + $Result1.StatusInfo.AffectedAttribute

Out-File -FilePath $Results_File -Encoding ascii -InputObject $Text_Line -Append
Write-Host $Text_Line -ForegroundColor Cyan
$null = Disconnect-HPEiLO -Connection $Connected_iLo
}
Write-Host "Execution has completed. Please press ENTER to exit the script" -ForegroundColor DarkYellow
Read-Host