VMware Cloud Community
antoniogemelli
Hot Shot
Hot Shot

ILO information by Script

I would like to ask if someone can try this script to check ILO information's I just need to know if is valid, I got these info when I run:

Header 1

   

iLOFirmwareHPSmartArraySystemBIOS
Hewlett-Packard BMC Firmware (node 0) 46:10000 2.20HP Smart Array Controller HPSA1 Firmware 6.64HP System BIOS I31 2015-04-01 00:00:00.000
Hewlett-Packard BMC Firmware (node 0) 46:10000 2.40HP Smart Array Controller HPSA1 Firmware 3.56HP System BIOS I36 2015-12-28 00:00:00.000
Hewlett-Packard BMC Firmware (node 0) 46:10000 2.40HP Smart Array Controller HPSA1 Firmware 4.02HP System BIOS I36 2015-12-28 00:00:00.000
Hewlett-Packard BMC Firmware (node 0) 46:10000 2.40HP Smart Array Controller HPSA1 Firmware 3.56HP System BIOS I36 2015-12-28 00:00:00.000
Hewlett-Packard BMC Firmware (node 0) 46:10000 2.40HP Smart Array Controller HPSA1 Firmware 3.56HP System BIOS I36 2015-12-28 00:00:00.000

So, I suppose 2.20, 2.40 are ILO version...thanks

Get-View -ViewType HostSystem -Property Name, Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo -SearchRoot (Get-View -ViewType ClusterComputeResource -Property Name -Filter @{"Name" = "^$([RegEx]::escape($strHostsClusterName))$"}).MoRef | %{

    $arrNumericSensorInfo = @($_.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo)

    # HostNumericSensorInfo for BIOS, iLO, array controller

    $nsiBIOS = $arrNumericSensorInfo | ? {$_.Name -like "*System BIOS*"}

    $nsiArrayCtrlr = $arrNumericSensorInfo | ? {$_.Name -like "HP Smart Array Controller*"}

    $nsiILO = $arrNumericSensorInfo | ? {$_.Name -like "Hewlett-Packard BMC Firmware*"}

    New-Object PSObject -Property @{

        VMHost = $_.Name

        "SystemBIOS" = $nsiBIOS.name

        "HPSmartArray" = $nsiArrayCtrlr.Name

        "iLOFirmware" = $nsiILO.Name

        }} | Export-Csv -Path C:\Users\gemela\ILO_info.csv -NoTypeInformation -UseCulture

Tags (2)
0 Kudos
5 Replies
exploreeverythi
Contributor
Contributor

Have you tried HP iLO Powershell Cmdlets? Scripting Tools for Windows PowerShell | HPE™

These are really cool and much easier to collect iLO info.

There is a readymade cmdlet for iLO firmware version:

PS C:\> get-help Get-HPiLOFirmwareVersion -Examples

NAME

    Get-HPiLOFirmwareVersion

   

SYNOPSIS

    Gets the iLO firmware version.

   

    -------------------------- EXAMPLE 1 --------------------------

   

    PS C:\> Get-HPiLOFirmwareVersion

    Please enter Server IP or Hostname: 1.4.217.131,187

    Do you want to add details for another server?(Y/N) : y

    Please enter Server IP or Hostname: 1.4.209.53

    Do you want to add details for another server?(Y/N) : n

   

    Username is not provided for the following iLO Server(s):

    1.4.217.131

    1.4.217.187

    1.4.209.53

    Use same Username for these servers? (Y/N) : N

    Enter Username for 1.4.217.131: administrator

    Enter Username for 1.4.217.187: alansmith

    Enter Username for 1.4.209.53: timhorton

   

    Password is not provided for the following iLO Server(s):

    1.4.217.131

    1.4.217.187

    1.4.209.53

    Use same Password for these servers? (Y/N) : N

    Enter Password for 1.4.217.131: ************

    Enter Password for 1.4.217.187: ************

    Enter Password for 1.4.209.53: ************

   

   

   

    IP                   : 1.4.217.131

    HOSTNAME             : iloqwc.company.net

    STATUS_TYPE          : OK

    STATUS_MESSAGE       : OK

    FIRMWARE_DATE        : Aug 28 2012

    FIRMWARE_VERSION     : 1.50

    LICENSE_TYPE         : iLO 3 Advanced

    MANAGEMENT_PROCESSOR : iLO3

   

    IP                   : 1.4.217.187

    HOSTNAME             : ilo.company.net)

    STATUS_TYPE          : OK

    STATUS_MESSAGE       : OK

    FIRMWARE_DATE        : Jan 20 2012

    FIRMWARE_VERSION     : 1.50

    LICENSE_TYPE         : iLO 3 Advanced

    MANAGEMENT_PROCESSOR : iLO3

   

    IP                   : 1.4.209.53

    HOSTNAME             : ilomxq.company.net

    STATUS_TYPE          : OK

    STATUS_MESSAGE       : OK

    FIRMWARE_DATE        : Mar 5 2012

    FIRMWARE_VERSION     : 1.60

    LICENSE_TYPE         : iLO 4 Advanced

    MANAGEMENT_PROCESSOR : iLO4

   

   

    This command shows a basic usage scenario where only the cmdlet name is entered. You are asked if the same credentials are to be used for multiple input servers or if separate credentials have to be collected for each server. Then you are asked if the same values for parameters are to be passed to the cmdlets or separate parameters are going to be used for each server. A list of iLO details is passed to the cmdlet in the form of PowerShell object or list of PowerShell objects or list of IP addresses of the iLO.

0 Kudos
antoniogemelli
Hot Shot
Hot Shot

Hi exploreeverything , thanks for suggestion, I will try but I also would like to validate my script.

0 Kudos
sivagndl
Enthusiast
Enthusiast

Could you please help, i am not able to get report  while using vCenter  6.5 & Build : 8024368. Is need to anything ?.  i am able to get report while using Vcenter 5.5 .

Get-View -ViewType HostSystem -Property Name, Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo -SearchRoot (Get-View -ViewType

ClusterComputeResource -Property Name -Filter @{"Name" = "^$([RegEx]::escape($strHostsClusterName))$"}).MoRef | %{ 

    $arrNumericSensorInfo = @($_.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo) 

    # HostNumericSensorInfo for BIOS, iLO, array controller 

    $nsiBIOS = $arrNumericSensorInfo | ? {$_.Name -like "*System BIOS*"} 

    $nsiArrayCtrlr = $arrNumericSensorInfo | ? {$_.Name -like "HP Smart Array Controller*"} 

    $nsiILO = $arrNumericSensorInfo | ? {$_.Name -like "Hewlett-Packard BMC Firmware*"} 

    New-Object PSObject -Property @{ 

        VMHost = $_.Name 

        "SystemBIOS" = $nsiBIOS.name 

        "HPSmartArray" = $nsiArrayCtrlr.Name 

        "iLOFirmware" = $nsiILO.Name 

        }} | Export-Csv -Path C:\temp\ILO_info.csv -NoTypeInformation -UseCulture 

0 Kudos
VijayKumarMyada
Enthusiast
Enthusiast

is it working? what is the command to add to get the ilo ip details as well in existing script.

0 Kudos
Roy_Atkins
Contributor
Contributor

Late response. Came looking for alternatives to what I have.

I don't think you'll get the required information via the HealthSystem objects.

The best thing I've found so far is this:

$Cli = Get-EsxCli -VmHost (Get-VmHost "name") -V2
$Cli.hardware.ipmi.bmc.get.Invoke()

This provides, IP, subnet, gateway, Mac, and firmware info for HPE iLO (and other vendor BMCs).

The problem I have is that this method is really slow in my environment. Get-EsxCli  connects to the host directly, so iterating over 20-30 hosts takes a long time to execute.

The HPE PowerShell  ILO cmdlets are great, as mentioned, but you need to connect directly to each iLO so you need the IP and credentials up front. The original intent of the question was how you'd discover the iLO's in the environment. The iLO cmdlets come with a cmdlet called Find-HPEiLO. - this accepts a network range and provides FQDN, IP, server h/w,  server serial number and iLO firmware, which might be enough for your needs.

0 Kudos