iLO PS Library


Please Note that this script library is no longer supported.  It was great while it lasted 🙂 Please take a look at HP’s Scripting tools for Powershell instead. This page has been left for historical purposes.

The library of common iLO Functions for powershell has been the result of writing iLO scripts over 3 years and finding that there is common code that can be reused. to use the code, all you need to do it put a .”\path\to\iloLibrary.ps1″ in the start of any scripts that you intend to use the functions in.

This is not aimed to be a definitive Powershell interface for iLO Devices, but rather a a means to be able to reuse code efficiently in multiple scripts.

Download iLO Powershell Library

 2012-02-02 Ver 1.1.2
    New - get-iLOCSRFromXML Function to be used with Parse-iLORIBCL*
    Mod - Modifications to Parse-iLOSanitiseXML to deal with XML weirdness
    Mod - Additional Error Handling to Parse-RIBCL if input is Null
    Mod - Renamed Functions
 2012-01-18 Ver 1.1.1
    New - get-iLOInfo() Function
    Mod - Mod-iLO Function to include BladeSystem XML Error Handling. Returns $null
 2012-01-14 Ver 1.1
    New - New-iLOCustomError() Function
    New - Parse-iLORIBCL() Function
    Mod - Created Aliases to Function to make more like powershell. Aliases should
          Be used in preference to function names. All function names from ver 1.0
         are now depreciated.
 2012-01-12 1.0 Initial Release


Sometimes I have found the powershell output does weird things with large output strings.  This function can be used to try and correct these problems. As it only uses string.replace(), it’s easily extendable.

Mod-iLO $ilointerface $iloScript $iLOOutputLogs
This  is for the most part the function that does all the heavy lifting for the Mass-Update Script. Function applies an RIBCL Script against an iLO Hostname and then outputs log files to the specified location. The Function will return a valid XML result structure from the log files.

Parse-iLORIBLogs  $iLOLogPath
Function Parses the log files generated by InterrogateiLO and returns the RIBCL Status messages, Information alerts and SSL CSRs if requested. This is useful for finding out if a script was successful or whether there was an error message. Results are returned as an array of objects.

Same as Parse-iLORIBLogs except for use in handling output of Mod-iLO function.

Parse-iLOIMLLogs $iLOLogPath
Same as ParseRIBCLLogs, except parses IML Logs which have been generated with the <GET_EVENT_LOG /> RIBCL Tag. Results returned as an Array of Objects. Useful for querying all server IMLs and searching for specific event or terms.

Parse-iLOEHLogs  $iLOLogPath
Same as ParseRIBCLLogs except parses log file that has been generated with <GET_EMBEDDED_HEALTH /> RIBCL Tag. Results returned as an array of Objects. Provides useful information such from system sensors for Temperatures, Fants etc. Will only work with systems that are iLO 2 or greater.

Parse-iLOHAGLogs  $iLOLogPath
Same as ParseRIBCLLogs except parses log file that has been generated with <GET_EMBEDDED_HEALTH /> RIBCL Tag, and specifically returns the results from the <HEALTH_AT_A_GLANCE> Tag. Results returned as an array of Objects. Provides a quick heads-up of system health. Will only work with Systems that are iLO 2 or greater.

Ping-iLO $iloHost
Performs a basic ping check to ensure the iLO Host is reachable. Returns a boolean value of true or false depending on success.

DetectLightsOutsVersion $iLOHost
Queries the iLO via it’s RIMP interface to determine the what iLO it is, such and iLO 2, Blade OA or similar. Returns result as an object.

Get-iLOBladeLocation $iloHost
Queries the iLO via it’s RIMP interface to return the location of the Blade Server by Chassis, Rack, Bay as an object. Only works for blade servers.

Get-iLOLicense $iloHost
Queries the iLO via it’s RIMP interface to return the iLo license information recorded as an object. Useful for auditing of licensing.

New-iLOCustomError $hostname $ErrID $ErrDescripion
Can  be used to create custom errors in your report, typically inline with Parse-iLORIBCL. Such examples are exception handling codes for Ping-iLO and get-iLOVersion functions.

get-iLOCSRFromXML ($ribcl)
Obtain the Certificate Signing Request for SSL from within a RIBCL Output. See the SSL Signing script for example use.


3 thoughts on “iLO PS Library

    1. Ben Post author

      Hi Danny,
      I’m not quite sure what you mean here. Are you doing a scanning a subnet and wanting to find out what on that subnet is an iLO? You can use the get-iLOVersion function to return either the iLO Type or Unknown as an answer.

  1. albvar

    Hello Ben – thanks for your post. Is there a way to interact with iLO v2? I am interested in controlling the power state on this version of the iLO. Any guidance is greatly appreciated.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s