Close Menu
PowerShell.roPowerShell.ro
  • Home
  • Automation
  • Powershell
  • VMWare
  • Windows
LinkedIn X (Twitter) Facebook
PowerShell.roPowerShell.ro
  • Home
  • Automation
  • Powershell
  • VMWare
  • Windows
LinkedIn Facebook X (Twitter)
PowerShell.roPowerShell.ro
Home»Automation»Automate your ILO configuration using HPE iLO Cmdlets
Automation

Automate your ILO configuration using HPE iLO Cmdlets

Catalin CristescuBy Catalin CristescuAugust 4, 2023
Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
Share
Facebook Twitter LinkedIn Pinterest Email

Automation, automation, automation – this is the key, once again!

Why waste 15-20 minutes configuring the ILO boards manually when we have the HPE iLO Cmdlets to automate the process?

In this article, I will introduce some PowerShell cmdlets for ILO configuration. Additionally, I will continue updating the post with new ones.

Prerequisites

We need the HPEiLOCmdlets module, which you can get from Powershell Gallery. To install the PowerCLI module, use the following command.

    Install-Module -Name HPEiLOCmdlets -Confirm:$false

HPE ILO Cmdlets from Powershell Gallery link is : https://www.powershellgallery.com/packages/HPEiLOCmdlets/4.2.0.0

Script

First we need to declare some variables and connect to our HPE ILO remote board.

$ILOname = "your_Ilo_Name"
$Creds = Get-Credential
$hostname = ""
$domain = ""
$ntpserver = ""
$dnsserver1 = ""
$dnsserver2 = ""

$connection = Connect-HPEiLO -Address $ILOname -Credential $Creds -DisableCertificateAuthentication:$true -Timeout 60 -Verbose

Below you can find some usefull cmdlets and what they are doing:

Power-Off the server
Set-HPeiLOServerPower -Connection $connection -Power Off -Force -ErrorAction Continue

#to get the status use the following cmdlet
(Get-HPEiLOServerPower -Connection $Connection ).Power
IPv6 Network settings
#this cmdlet will disable IPV6 on the Dedicated interface

Set-HPEiLOIPv6NetworkSetting -Connection $connection -InterfaceType Dedicated -RegisterDDNSServer Disabled -DHCPv6StatefulMode Disabled -DHCPv6DNSServer Disabled -DHCPv6RapidCommit Disabled -DHCPv6StatelessMode Disabled -DHCPv6SNTPSetting Disabled -DHCPv6DomainName Disabled -StatelessAddressAutoConfiguration Disabled
IPv4 Network Settings
#this cmdlet will set the DNS servers on the IPv4 dedicated interface and ILO hostname, domain and enable the PingGateway
$dnstype = ,@("Primary","Secondary")
$dnsserver = ,@("$dnsserver1","$dnsserver2")
Set-HPEiLOIPv4NetworkSetting -Connection $connection -InterfaceType Dedicated -DNSName $hostname -DomainName $Domain -RegisterDDNSServer Disabled -DNSServerType $dnstype -DNSServer $dnsserver -PingGateway Enabled
NTP Settings
# set the NTP server and the timezone to CET
Set-HPEiLOSNTPSetting -Connection $connection -InterfaceType Dedicated -Timezone "CET" -SNTPServer "$ntpserver"
Create ILO user
#add a local user and set the login priviledges
Add-HPEiLOUser -connection $connection -LoginName "ILOnewUser" -Username "ILOnewUser" -Password "ilopassword" -LoginPrivilege Yes -RemoteConsolePrivilege Yes -VirtualMediaPrivilege Yes -VirtualPowerAndResetPrivilege Yes -IloConfigPrivilege Yes
Disconnect ILO session
#use this cmdlet to disconnect your powershell session
Disconnect-HPEiLO -Connection $connection 

What tasks did we covered :

  1. Shutting down the server.
  2. Configuring the IPv4 network settings for the Dedicated interface.
  3. “Disabling the IPv6 network settings for the Dedicated interface.
  4. Configuring the SNTP
  5. Adding a local user.
  6. Disconnecting the current session.

Keep you posted !

gen10 servers HPEiLOCmdlets ilo powershell proliant vmware
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleCheck the alarms on all ESXi Hosts via Powershell
Next Article Get HA events of VM restart from vCenter
Catalin Cristescu
  • Website

Related Posts

Automation

PowerShell script for automated remediation for CrowdStrike issue

July 20, 2024
VMWare

vExperts stats 2024

May 27, 2024
Automation

Tagging Virtual Machines with the CISTag Module in PowerShell

February 1, 2024

Comments are closed.

Recent Posts
  • PowerShell script for automated remediation for CrowdStrike issue
  • vExperts stats 2024
  • Tagging Virtual Machines with the CISTag Module in PowerShell
  • Update HPE ILO firmware using PowerShell
  • PowerCLI script to check Cluster Overcommitment ratio
Categories
  • Automation (11)
  • Powershell (14)
  • Uncategorized (1)
  • VMWare (15)
  • Windows (2)
About Powershell.ro

Powershell.ro, the ultimate hub for tech enthusiasts! Dive into expert-written articles on PowerShell scripts, VMware, automation, Microsoft technologies, and DevOps practices. Unlock tips, tutorials, and solutions designed to empower IT professionals and boost your skills in automation and infrastructure management.

Recent Posts
  • PowerShell script for automated remediation for CrowdStrike issue
  • vExperts stats 2024
  • Tagging Virtual Machines with the CISTag Module in PowerShell
  • Update HPE ILO firmware using PowerShell
  • PowerCLI script to check Cluster Overcommitment ratio
LinkedIn
© 2025 PowerShell.ro.

Type above and press Enter to search. Press Esc to cancel.