HP Scripting Tools for Windows PowerShell User Guide iLO Cmdlets Abstract This document contains instructions for using HP Scripting Tools for Windows PowerShell to manage HP iLO. It is intended for system administrators who use the HP Scripting Tools for Windows PowerShell to manage their IT infrastructure.
© Copyright 2013, 2014 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Contents 1 Introduction to HP Scripting Tools for Windows PowerShell...............................4 Windows PowerShell.................................................................................................................4 Features..................................................................................................................................4 2 Installation.................................................................................................5 System prerequisites....
1 Introduction to HP Scripting Tools for Windows PowerShell The HP Scripting Tools for Windows PowerShell provides a simplified and consistent infrastructure management experience. This set of PowerShell utilities provides a comprehensive set of HP integration tools. It is designed for IT experts with experience in PowerShell scripting and configuring ProLiant server hardware.
2 Installation System prerequisites The following prerequisites must be met before installing HP iLO Cmdlets for Windows PowerShell. There are also several items to consider in the install. • • Microsoft Management Framework 3.0 or later (which includes PowerShell 3.0 or later) must be installed on your system before installing the HP Scripting Tools for Windows PowerShell. Microsoft .NET Framework 4 or later must be installed before installing Microsoft Management Framework 3.0 or later.
Procedure 2 1. 2. • Click Start and select Run... In the Run dialog enter the path and filename of the correct installer for your system, either the 64-bit (HPiLOCmdlets-x64.msi) or the 32-bit (HPiLOCmdlets-x86.msi). It might be necessary to change the execution policy for PowerShell.
3 HP Scripting Tools for Windows PowerShell cmdlets Table 1 provides a list and brief description of all the HPiLOCmdlets for Windows PowerShell. Cmdlet Help The HPiLOCmdlets are supported by help, which is used in the same way as other PowerShell cmdlets.
Table 1 HP iLO Cmdlets for Windows PowerShell (continued) 8 Cmdlet Description Get-HPiLOEventLog Gets the iLO event logs Get-HPiLOFan Gets the Fan health details from the server Get-HPiLOFIPSStatus Gets the current Enforce AES/3DES Encryption status.
Table 1 HP iLO Cmdlets for Windows PowerShell (continued) Cmdlet Description Get-HPiLOSNMPIMSetting Gets the respective iLO SNMP IM settings Get-HPiLOSpatial Gets the location information and system data with HP Asset Manager to obtain more precise and complete asset data Get-HPiLOSSOSetting Gets the SSO Setting for the iLO Get-HPiLOStorageController Gets the storage controller status of the server Get-HPiLOTemperature Gets the temperature health details of the server Get-HPiLOUIDStatus Gets th
Table 1 HP iLO Cmdlets for Windows PowerShell (continued) Cmdlet Description Set-HPiLOKerberosConfig Configures the Kerberos authentication Set-HPiLOLicenseKey Applies a license key for the Integrated Lights-Out Advanced Pack Set-HPiLOLockConfiguration Enable the data-center configuration lock for iLO Set-HPiLONetworkSetting Modifies the network settings of the host server where the iLO is located Set-HPiLOOneTimeBootOrder Set One Time Boot Order Set-HPiLOPassword Changes the password of a loca
• Sets are supported with the comma character. For example, 1a00,1b00::1fe8 resolves to two addresses, 1a00::1fe8 and 1b00::1fe8. • Examples in this document use IPv4 but could use IPv6 instead if supported in the network. Both IPv4 and IPv6 addresses can be used within one cmdlet. For more information on IPv6, see the following website or the references it links to: http://en.wikipedia.org/wiki/IPv6.
comma is interpreted as a list separator by PowerShell. Without double quotes, part of what should be a string is interpreted by PowerShell as a number. The operation of combined ranges is defined as creating a combination of each subnet address with each other subnet. The following are examples of input range parameters using double quotes. Range Parameter Description “192.168.1.1,15” Specifies two addresses to check, 192.168.1.1 and 192.168.1.15. “192.168.217,216.
LICENSE_TYPE : iLO 3 Advanced MANAGEMENT_PROCESSOR : iLO3 IP HOSTNAME STATUS_TYPE STATUS_MESSAGE FIRMWARE_DATE FIRMWARE_VERSION LICENSE_TYPE MANAGEMENT_PROCESSOR : : : : : : : : 192.168.217.103 iloromqap8207bc.company.net OK OK Nov 05 2013 1.32 iLO 4 Advanced iLO4 The verbose output shown indicates that seven threads are being used for Find-HPiLO, which lists each address being checked, and then two threads in the Get-HPiLOFirmwareVersion command.
http://www.hp.com/go/powershell. Do you want to go there to download the new version?(Y/N): Y If you respond Yes to the download prompt, a browser window opens and you can download and install the newer version. Using the Update-HPiLOFirmware cmdlet The Update-HPiLOFirmware cmdlet is used to update a firmware image on iLO. To update the firmware, perform the following steps: 1. Locate and download the iLO firmware package from the following website: http://www.hp.com/go/ilo . 2. 3.
When a CSV file is imported into PowerShell, it creates an object array that has elements with member name properties set to the first row names, and each element of the array set to each line of the spreadsheet. CSV input file: Input1.csv: Server,Username,Password,HostPower 192.168.1.1,admin,admin123,Yes 192.168.1.3,admin,admin123,Yes If the input CSV file has Server, Username, Password, and the HostPower values, the following PowerShell script could be used. PowerShell script: $path = ".\input1.
CSV input file: Input2.csv: Server 192.168.1.1 192.168.1.3 If the input CSV file has only iLO IP or hostname and there is a common username and password for logging in, and if all the servers have to be switched on, the following script could be used. PowerShell script: $path = ".\input2.csv" $csv = Import-Csv $path $rt = Set-HPiLOHostPower -Server $csv.Server -Username "admin" ` -Password "admin123" -HostPower "Yes" $rt | Format-List $rt = Get-HPiLOHostPower -Server $csv.
IP HOSTNAME STATUS_TYPE STATUS_MESSAGE : : : : 192.168.1.3 isabella-vp2.company.net WARNING {Host power is already ON.} IP HOSTNAME STATUS_TYPE STATUS_MESSAGE HOST_POWER : : : : : 192.168.1.1 ilohostbc.company.net OK OK ON IP HOSTNAME STATUS_TYPE STATUS_MESSAGE HOST_POWER : : : : : 192.168.1.3 isabella-vp2.company.
} The IP addresses, including the user names and passwords, for the iLOs that you want to view are imported from the CSV file. For each iLO included, you can identify the types of entries and the count of each. This preceding script works for many entries in the input CSV file. Script output: 192.168.1.9 has 93 iLO log entries. There are 2 type(s) of events in the iLO log. Count Name ----- ---90 Informational 3 Caution 192.168.1.14 has 255 iLO log entries. There are 2 type(s) of events in the iLO log.
Return objects and error handling The iLO cmdlets return PowerShell custom objects (PSObject) as the default.2 Values for the returned objects can be accessed and used as any other objects in PowerShell. If you have $rt set to the returned object from iLO, it should contain either $null (no value is returned) or contain a returned object. For example, to access the HOST_POWER property in the returned object, use $rt.HOST_POWER.
Script writing methodology When deciding to write a script, you generally know what you want to accomplish. One of the powerful features of PowerShell ISE is that you can build a script piece-by-piece, testing code and viewing objects to get a better understanding how to accomplish what you want to do. Here is a typical process you might want to use for creating PowerShell scripts. 1. Determine what type of data you want to get. 2. Execute the appropriate command interactively to retrieve the data. 3.
4 Troubleshooting General issues Verifying iLO firmware versions If a problem occurs, your first action should be to verify that the most current versions of iLO firmware are installed. Updating to the most current firmware might solve the problem. For information on updating iLO firmware, see the HP iLO 4 User Guide. To determine if there is a newer version of iLO cmdlets available, see “Using the Get-HPiLOModuleVersion and Update-HPiLOModuleVersion cmdlets” (page 13).
5 Support and other resources Contacting HP For worldwide technical support information, see the HP support website: http://www.hp.com/support Before contacting HP, collect the following information: • Error messages • Operating system type and revision level • Detailed questions Support Information HP offers a number of additional software support services, many of which are provided to our customers at no additional charge.
Windows PowerShell resources The following websites provide useful information for using PowerShell. • Microsoft Script Center • Windows PowerShell Blog • PowerShell.com • PowerShell Community Groups • PowerShell.
6 Documentation feedback HP is committed to providing documentation that meets your needs. To help us improve the documentation, send any errors, suggestions, or comments to Documentation Feedback (docsfeedback@hp.com). Include the document title and part number, version number, or the URL when submitting your feedback.
Index C support and other resources, 22 supported operating systems, 5 cmdlet help, 7 contact support, 22 contacting HP, 22 T D troubleshooting, 21 iLO firmware versions, 21 documentation providing feedback on, 24 U E W examples error handling, 19 log processing , 17 Windows PowerShell, 4 resources, 23 uninstalling, 6 F features, 4 Find-HPiLO cmdlet, 11 H HP iLO Cmdlets for Windows PowerShell, 10 HP Scripting Tools for Windows PowerShell features, 4 installation, 5 introduction, 4 HP Support C