Get AHS Data from HPE iLO4+ using PowerShell


Warning: Use of undefined constant gad_content_tag_filter_replace - assumed 'gad_content_tag_filter_replace' (this will throw an Error in a future version of PHP) in /home3/oshelpc1/public_html/wp-content/plugins/web-ninja-google-analytics/webninja_ga.php on line 1813

I discovered this possibility a year back, and it’s only now I invested the time to get this working! It turned out not to be as challenging as I thought, in fact the hardest bit was getting the authentication token.

I have written a PowerShell function called Get-AHSData which allows you to gather the AHS data from an HPE iLO 4 or newer. These AHS logs are frequently requested by HPE Support when logging calls for Proliant, and downloading these using the iLO UI can be cumbersome – and involves a mouse!

Get-AHSData will allow you to specify the server, iLO Credentials and a Start / End date for the log range if necessary. By default it will grab metrics for 1 day. You specify a folder to export the file to and it will go grab the file and save it there, returning a file list (if you run against multiple iLOs).

Code is out on GitHub Here

Sorry it’s a little long to embed here, and keeping it in GitHub will allow me to iterate it with improvements without having to circle back and update this page.

An example of this running:

Let me know on GitHub if you have any issues, or feel free to fork and improve! I already have a couple of enhancements from my colleagues which I will look to include.