### Connect-HPESA / Find-HPESA / New-HPESALogicalDrive Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Connects to the HPE Smart Array controller management interface, discovers installed controllers and physical drives, and creates a new logical drive with a specified RAID level. ```APIDOC ## Connect-HPESA / Find-HPESA / New-HPESALogicalDrive ### Description Connects to the HPE Smart Array controller management interface, discovers installed controllers and physical drives, and creates a new logical drive with a specified RAID level. ### Parameters #### Path Parameters - **IP** (string) - Required - The IP address of the HPE iLO interface. - **Credential** (object) - Required - PSCredential object for authentication. - **DisableCertificateAuthentication** (boolean) - Optional - Disables certificate authentication. - **Connection** (object) - Required - Connection object to the HPE Smart Array controller. - **ControllerLocation** (string) - Required - The location of the Smart Array controller (e.g., "Slot 0"). - **RAIDLevel** (string) - Required - The desired RAID level for the new logical drive (e.g., "RAID1", "RAID5"). - **PhysicalDrives** (array) - Required - An array of physical drive identifiers to include in the logical drive. ### Request Example ```powershell Import-Module HPESmartArrayCmdlets $credential = Get-Credential $connection = Connect-HPESA -IP "192.168.1.10" -Credential $credential -DisableCertificateAuthentication # Discover controllers $find = Find-HPESA -Connection $connection $controllers = $find.SmartArrayController.ControllerLocation Write-Host "Available controllers: $($controllers -join ', ')" # List physical drives on Slot 0 $physDrives = Get-HPESAPhysicalDrive -Connection $connection -ControllerLocation "Slot 0" $physDrives.PhysicalDrive.Location # Example of creating a new logical drive (assuming two drives are available) # $newLogicalDrive = New-HPESALogicalDrive ` # -Connection $connection ` # -ControllerLocation "Slot 0" ` # -RAIDLevel "RAID1" ` # -PhysicalDrives @("1I:1:1", "1I:1:2") # Disconnect-HPESA -Connection $connection ``` ### Response #### Success Response - **SmartArrayController** (object) - Information about the Smart Array controller(s). - **ControllerLocation** (string) - The location identifier of the controller. - **PhysicalDrive** (object) - Information about physical drives. - **Location** (string) - The location identifier of the physical drive. - **Status** (string) - Indicates the status of the operation (e.g., "Success", "Error"). - **StatusInfo** (object) - Contains detailed information about the status, including Message, Category, and AffectedAttribute if an error occurred. #### Response Example ```json { "SmartArrayController": { "ControllerLocation": "Slot 0" }, "PhysicalDrive": { "Location": "1I:1:1" }, "Status": "Success", "StatusInfo": null } ``` ``` -------------------------------- ### Connect to HPEA and Get Server Status Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Connects to an HP c-Class BladeSystem OnboardAdministrator using credentials from a CSV file or interactively. Retrieves power, health, and UID LED status for all blade bays. Disconnects after use. ```powershell Import-Module HPEOACmdlets # Connect using Input.csv (columns: IP, Username, Password) or interactively $csv = Import-Csv ".\Input.csv" $connection = $csv | Connect-HPEOA # Get status for all blade bays $status = Get-HPEOAServerStatus -Bay All $connection $status.Blade | Select-Object Bay, Power, CurrentWattageUsed, Health, UnitIdentificationLED, VirtualFan | Format-List # Expected output per blade: # Bay : 1 # Power : On # CurrentWattageUsed : 185 # Health : OK # UnitIdentificationLED: Off # VirtualFan : Normal Disconnect-HPEOA $connection ``` -------------------------------- ### Invoke HPE Cmdlet Migration Source: https://github.com/hewlettpackard/powershell-proliant-sdk/blob/master/HPEMigrationAdvisoryTool/1.0.0.0/en-US/about_HPEMigrationAdvisoryTool.Help.txt Use this cmdlet to analyze a script file and get suggestions for migrating HPE Cmdlets to the latest module. Specify the script file path and the target cmdlet module. ```powershell Invoke-HPECmdletMigration -ScriptFile C:\powerTest.ps1 -CmdletModule HPBIOSCmdlets ``` -------------------------------- ### Configure UEFI Boot Order Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Reads and reorders the UEFI boot option list for Gen9 and Gen10 servers. Pass index numbers separated by commas to specify the new priority. Ensure the module `HPEBIOSCmdlets` is imported. ```powershell Import-Module HPEBIOSCmdlets $credential = Get-Credential $connection = Connect-HPEBIOS -IP "192.168.1.10" -Credential $credential -DisableCertificateAuthentication # Read current UEFI boot order $current = $connection | Get-HPEBIOSUEFIBootOrder $current.UEFIBootOrder | Format-Table -AutoSize # Index BootSource # ----- ---------- # 1 UEFI - PXE IPv4 # 2 UEFI - Local Storage # 3 UEFI - CD/DVD # Set new boot order: local storage first, then PXE, then CD $result = $connection | Set-HPEBIOSUEFIBootOrder -UEFIBootOrder "2,1,3" if ($result.Status -eq "Error") { Write-Host "Failed: $($result.StatusInfo.Message)" -ForegroundColor Red } else { Write-Host "Boot order updated." -ForegroundColor Green # Confirm ($connection | Get-HPEBIOSUEFIBootOrder).UEFIBootOrder | Format-Table -AutoSize } Disconnect-HPEBIOS -Connection $connection ``` -------------------------------- ### Get-HPEBIOSUEFIBootOrder / Set-HPEBIOSUEFIBootOrder Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Reads and reorders the UEFI boot option list for Gen9 and Gen10 servers. Pass index numbers (from `Get-HPEBIOSUEFIBootOrder`) separated by commas to specify the new priority. ```APIDOC ## Get-HPEBIOSUEFIBootOrder / Set-HPEBIOSUEFIBootOrder ### Description Reads and reorders the UEFI boot option list for Gen9 and Gen10 servers. Pass index numbers (from `Get-HPEBIOSUEFIBootOrder`) separated by commas to specify the new priority. ### Parameters #### Path Parameters - **Connection** (object) - Required - Connection object to the HPE iLO interface. - **UEFIBootOrder** (string) - Optional - A comma-separated string of index numbers representing the desired UEFI boot order. ### Request Example ```powershell Import-Module HPEBIOSCmdlets $credential = Get-Credential $connection = Connect-HPEBIOS -IP "192.168.1.10" -Credential $credential -DisableCertificateAuthentication # Read current UEFI boot order $current = $connection | Get-HPEBIOSUEFIBootOrder $current.UEFIBootOrder | Format-Table -AutoSize # Set new boot order: local storage first, then PXE, then CD $result = $connection | Set-HPEBIOSUEFIBootOrder -UEFIBootOrder "2,1,3" if ($result.Status -eq "Error") { Write-Host "Failed: $($result.StatusInfo.Message)" -ForegroundColor Red } else { Write-Host "Boot order updated." -ForegroundColor Green # Confirm ($connection | Get-HPEBIOSUEFIBootOrder).UEFIBootOrder | Format-Table -AutoSize } Disconnect-HPEBIOS -Connection $connection ``` ### Response #### Success Response - **Status** (string) - Indicates the status of the operation (e.g., "Success", "Error"). - **StatusInfo** (object) - Contains detailed information about the status, including Message, Category, and AffectedAttribute if an error occurred. - **UEFIBootOrder** (array) - An array of strings representing the current UEFI boot order. #### Response Example ```json { "Status": "Success", "StatusInfo": null, "UEFIBootOrder": [ "UEFI - Local Storage", "UEFI - PXE IPv4", "UEFI - CD/DVD" ] } ``` ``` -------------------------------- ### Configure HPE iLO Boot Mode Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Use Get-HPEiLOBootMode to read the current and pending boot modes. Use Set-HPEiLOBootMode to change the pending boot mode to UEFI or LegacyBios. Changes take effect after the next server reboot. ```powershell $connection = Connect-HPEiLO -IP "192.168.1.10" -Username "Admin" -Password "P@ssw0rd" ` -DisableCertificateAuthentication # Get current boot mode $current = Get-HPEiLOBootMode -Connection $connection $current | Format-List # CurrentBootMode : LegacyBIOS # PendingBootMode : LegacyBIOS # Change to UEFI (takes effect on next reboot) $result = Set-HPEiLOBootMode -Connection $connection -PendingBootMode "UEFI" if ($result.Status -eq "Error") { Write-Host "Failed: $($result.StatusInfo.Message)" -ForegroundColor Red } else { Write-Host "Boot mode set to UEFI successfully." -ForegroundColor Green } # Confirm pending change $updated = Get-HPEiLOBootMode -Connection $connection $updated | Format-List # PendingBootMode : UEFI Disconnect-HPEiLO -Connection $connection ``` -------------------------------- ### Get-HPEiLOFirmwareInventory / Update-HPEiLOFirmware Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Retrieves the full firmware inventory across all components and updates firmware from a local binary file. ```APIDOC ## Get-HPEiLOFirmwareInventory / Update-HPEiLOFirmware ### Description Retrieves the full firmware inventory across all components (iLO, BIOS, NICs, storage controllers) and updates firmware from a local binary file. Supports an upload timeout between 120–1800 seconds and a `-TPMEnabled` switch to acknowledge TPM-protected systems. ### Parameters #### Get-HPEiLOFirmwareInventory - **Connection** (object) - Required - An established connection object to the iLO interface. #### Update-HPEiLOFirmware - **Connection** (object) - Required - An established connection object to the iLO interface. - **Location** (string) - Required - The local path to the firmware binary file. - **UploadTimeout** (int) - Optional - The timeout in seconds for the firmware upload (120-1800). - **TPMEnabled** (switch) - Optional - Acknowledges TPM-protected systems. - **Confirm** (switch) - Optional - Prompts for confirmation before proceeding. ### Request Example (Update-HPEiLOFirmware) ```powershell $connection = Connect-HPEiLO -IP "192.168.1.10" -Username "Admin" -Password "P@ssw0rd" -DisableCertificateAuthentication $update = Update-HPEiLOFirmware -Connection $connection -Location "C:\Firmware\ilo5_230.bin" -UploadTimeout 180 -TPMEnabled:$true -Confirm:$false Disconnect-HPEiLO -Connection $connection ``` ### Response Example (Get-HPEiLOFirmwareInventory) ```json { "FirmwareInformation": [ { "Index": 1, "FirmwareName": "iLO 5", "FirmwareVersion": "2.30 Feb 15 2021" } ] } ``` ### Response Example (Update-HPEiLOFirmware) ```json { "Status": "Success", "StatusInfo": { "Message": "Firmware update initiated." } } ``` ``` -------------------------------- ### Retrieve Server Health Data with Get-HPEiLOServerInfo Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Obtain a comprehensive hardware snapshot from connected iLO servers, including fans, temperatures, power supplies, memory, network adapters, and processors. The output structure varies between iLO 4 and iLO 5. ```powershell $connection = Connect-HPEiLO -IP "192.168.1.10" -Username "Admin" -Password "P@ssw0rd" ` -DisableCertificateAuthentication $info = Get-HPEiLOServerInfo -Connection $connection # Fan info $info.FanInfo | Format-List # Temperature sensors $info.TemperatureInfo | Format-List # Power supply summary $info.PowerSupplyInfo.PowerSupplySummary | Format-List $info.PowerSupplyInfo.PowerSupplies | Format-List # Memory $info.MemoryInfo.MemoryDetailsSummary | Format-List $info.MemoryInfo.MemoryDetails.MemoryData | Format-List # NICs $info.NICInfo.NetworkAdapter | Format-List $info.NICInfo.EthernetInterface | Format-List # Processors $info.ProcessorInfo | Format-List $info.ProcessorInfo.Cache | Format-List # Overall health $info.HealthSummaryInfo | Format-List Disconnect-HPEiLO -Connection $connection ``` -------------------------------- ### Connect-HPEiLO / Disconnect-HPEiLO Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Establishes authenticated sessions to one or more iLO targets concurrently using parallelized threads. The connection object returned is used by subsequent cmdlets. It is crucial to pair `Connect-HPEiLO` with `Disconnect-HPEiLO` for proper session management. ```APIDOC ## Connect-HPEiLO / Disconnect-HPEiLO ### Description Manages authenticated sessions to iLO targets. `Connect-HPEiLO` establishes connections, returning a session object, while `Disconnect-HPEiLO` closes these sessions. Supports parallel connections and should be used with `try...finally` blocks for robust session handling. ### Method `Connect-HPEiLO` `Disconnect-HPEiLO` ### Parameters #### Path Parameters None #### Query Parameters - **IP** (string[]) - Required - IP addresses of the iLO targets. - **Username** (string[]) - Required - Usernames for authentication. - **Password** (string[]) - Required - Passwords for authentication. - **DisableCertificateAuthentication** (switch) - Optional - Disables certificate-based authentication. - **Connection** (object) - Required for `Disconnect-HPEiLO` - The connection object returned by `Connect-HPEiLO`. #### Request Body None ### Request Example ```powershell Import-Module HPEiLOCmdlets Enable-HPEiLOLog Set-HPEiLOMaxThreadLimit -MaxThreadLimit 128 $connection = Connect-HPEiLO ` -IP "192.168.1.10","192.168.1.11" ` -Username "Administrator","Administrator" ` -Password "P@ssw0rd","P@ssw0rd" ` -DisableCertificateAuthentication ` -WarningAction SilentlyContinue if ($null -eq $connection) { Write-Host "No connections established." -ForegroundColor Red exit } foreach ($c in $connection) { Write-Host "Connected to: $($c.IP)" -ForegroundColor Green $c.TargetInfo | Format-List $c.ExtendedInfo | Format-List } $test = Test-HPEiLOConnection -Connection $connection $test | Format-List try { # ... management operations here ... } finally { $disconnect = Disconnect-HPEiLO -Connection $connection Disable-HPEiLOLog Write-Host "All sessions disconnected." } ``` ### Response #### Success Response (200) - **Connect-HPEiLO**: Returns a connection object representing the established sessions. - **Disconnect-HPEiLO**: Returns a status indicating successful disconnection. #### Response Example (Connection object details and disconnection status) ``` -------------------------------- ### Get-HPEiLOServerInfo Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Retrieves a comprehensive hardware health snapshot for each connected server, including details on fans, temperatures, power supplies, memory, network adapters, processors, and an overall health summary. The structure of the returned object may vary slightly between iLO 4 and iLO 5 generations. ```APIDOC ## Get-HPEiLOServerInfo ### Description Fetches detailed hardware health information for connected HPE servers. This cmdlet provides a granular view of server components and their current status, essential for monitoring and troubleshooting. ### Method `Get-HPEiLOServerInfo` ### Parameters #### Path Parameters None #### Query Parameters - **Connection** (object) - Required - The connection object obtained from `Connect-HPEiLO`. #### Request Body None ### Request Example ```powershell $connection = Connect-HPEiLO -IP "192.168.1.10" -Username "Admin" -Password "P@ssw0rd" ` -DisableCertificateAuthentication $info = Get-HPEiLOServerInfo -Connection $connection # Fan info $info.FanInfo | Format-List # Temperature sensors $info.TemperatureInfo | Format-List # Power supply summary $info.PowerSupplyInfo.PowerSupplySummary | Format-List $info.PowerSupplyInfo.PowerSupplies | Format-List # Memory $info.MemoryInfo.MemoryDetailsSummary | Format-List $info.MemoryInfo.MemoryDetails.MemoryData | Format-List # NICs $info.NICInfo.NetworkAdapter | Format-List $info.NICInfo.EthernetInterface | Format-List # Processors $info.ProcessorInfo | Format-List $info.ProcessorInfo.Cache | Format-List # Overall health $info.HealthSummaryInfo | Format-List Disconnect-HPEiLO -Connection $connection ``` ### Response #### Success Response (200) - **FanInfo** (object[]) - Information about server fans. - **TemperatureInfo** (object[]) - Temperature sensor readings. - **PowerSupplyInfo** (object) - Details about power supplies, including summary and individual units. - **MemoryInfo** (object) - Information about memory modules. - **NICInfo** (object) - Details about network adapters and interfaces. - **ProcessorInfo** (object) - Information about server processors and cache. - **HealthSummaryInfo** (object) - An overall health status summary for the server. #### Response Example (Detailed objects for each health component, structure varies by iLO generation) ``` -------------------------------- ### Manage HPE iLO Sessions with Connect-HPEiLO and Disconnect-HPEiLO Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Establish authenticated iLO sessions using Connect-HPEiLO, supporting parallel connections. Always pair with Disconnect-HPEiLO in a finally block for clean session termination. Diagnostic logging can be enabled/disabled. ```powershell Import-Module HPEiLOCmdlets Enable-HPEiLOLog # Start diagnostic logging (requires admin) # Adjust the connection thread pool limit Set-HPEiLOMaxThreadLimit -MaxThreadLimit 128 Write-Host "Max threads: $(Get-HPEiLOMaxThreadLimit)" # Establish connections to all reachable hosts $connection = Connect-HPEiLO ` -IP "192.168.1.10","192.168.1.11" ` -Username "Administrator","Administrator" ` -Password "P@ssw0rd","P@ssw0rd" ` -DisableCertificateAuthentication ` -WarningAction SilentlyContinue if ($null -eq $connection) { Write-Host "No connections established." -ForegroundColor Red exit } # Inspect connection details foreach ($c in $connection) { Write-Host "Connected to: $($c.IP)" -ForegroundColor Green $c.TargetInfo | Format-List # iLO generation, firmware version, etc. $c.ExtendedInfo | Format-List } # Verify connectivity $test = Test-HPEiLOConnection -Connection $connection $test | Format-List try { # ... management operations here ... } finally { $disconnect = Disconnect-HPEiLO -Connection $connection Disable-HPEiLOLog Write-Host "All sessions disconnected." } ``` -------------------------------- ### Create RAID-5 Logical Drive with HPESmartArray Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Creates a new RAID-5 logical drive using specified physical drives on a ProLiant server. Ensure the connection object is valid and controller/drive locations are correct. ```powershell New-HPESALogicalDrive ` -Connection $connection ` -ControllerLocation "Slot 0" ` -LogicalDriveName "DataVol01" ` -Raid "Raid5" ` -DataDrive @("1I:1:1", "1I:1:2", "1I:1:3") ``` -------------------------------- ### Get-HPEiLOBootMode / Set-HPEiLOBootMode Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Reads and sets the pending UEFI/Legacy BIOS boot mode for HPE ProLiant servers. The change becomes effective after the next server reboot. ```APIDOC ## Get-HPEiLOBootMode / Set-HPEiLOBootMode ### Description Reads and sets the pending UEFI/Legacy BIOS boot mode for HPE ProLiant servers. The change becomes effective after the next server reboot. Valid values are `UEFI` and `LegacyBios`. ### Parameters #### Get-HPEiLOBootMode - **Connection** (object) - Required - An established connection object to the iLO interface. #### Set-HPEiLOBootMode - **Connection** (object) - Required - An established connection object to the iLO interface. - **PendingBootMode** (string) - Required - The desired boot mode. Valid values: `UEFI`, `LegacyBios`. ### Request Example (Set-HPEiLOBootMode) ```powershell $connection = Connect-HPEiLO -IP "192.168.1.10" -Username "Admin" -Password "P@ssw0rd" -DisableCertificateAuthentication $result = Set-HPEiLOBootMode -Connection $connection -PendingBootMode "UEFI" Disconnect-HPEiLO -Connection $connection ``` ### Response Example (Get-HPEiLOBootMode) ```json { "CurrentBootMode": "LegacyBIOS", "PendingBootMode": "LegacyBIOS" } ``` ### Response Example (Set-HPEiLOBootMode) ```json { "Status": "Success", "StatusInfo": { "Message": "Command completed successfully." } } ``` ``` -------------------------------- ### Connect to HPE Smart Array Controller Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Connects to the HPE Smart Array controller management interface. This is the first step before discovering controllers or managing drives. Ensure the `HPESmartArrayCmdlets` module is imported. ```powershell Import-Module HPESmartArrayCmdlets $credential = Get-Credential $connection = Connect-HPESA -IP "192.168.1.10" -Credential $credential -DisableCertificateAuthentication # Discover controllers $find = Find-HPESA -Connection $connection $controllers = $find.SmartArrayController.ControllerLocation Write-Host "Available controllers: $($controllers -join ', ')" # Slot 0, Slot 1 # List physical drives on Slot 0 $physDrives = Get-HPESAPhysicalDrive -Connection $connection -ControllerLocation "Slot 0" $physDrives.PhysicalDrive.Location # 1I:1:1, 1I:1:2, 1I:1:3, 1I:1:4 ``` -------------------------------- ### Display Migration Results Source: https://github.com/hewlettpackard/powershell-proliant-sdk/blob/master/HPEMigrationAdvisoryTool/1.0.0.0/en-US/about_HPEMigrationAdvisoryTool.Help.txt After running Invoke-HPECmdletMigration, the results are stored in a variable. Display the contents of this variable to view the migration suggestions. ```powershell $returnObject = ``` -------------------------------- ### Discover Reachable iLO Hosts with Find-HPEiLO Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Use Find-HPEiLO to scan IP addresses or CIDR ranges and identify reachable iLO hosts without needing credentials. Outputs objects with IP, Hostname, and iLOGeneration. ```powershell Import-Module HPEiLOCmdlets # Prepare IP list from CSV $inputcsv = Import-Csv ".\iLOInput.csv" # columns: IP, Username, Password # Discover which hosts are reachable (no credentials needed) $reachable = Find-HPEiLO -Range $inputcsv.IP -WarningAction SilentlyContinue # Output: list of reachable IPs $reachable.IP # Expected output: # 192.168.1.10 # 192.168.1.11 ``` -------------------------------- ### New-HPESALogicalDrive Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Creates a new RAID-5 logical drive using specified physical drives on an HPE Smart Array controller. ```APIDOC ## New-HPESALogicalDrive ### Description Creates a new RAID-5 logical drive using 3 physical drives. ### Parameters #### Path Parameters - **Connection** (object) - Required - The connection object to the HPE server. - **ControllerLocation** (string) - Required - The location of the controller, e.g., "Slot 0". - **LogicalDriveName** (string) - Required - The name for the new logical drive. - **Raid** (string) - Required - The RAID level, e.g., "Raid5". - **DataDrive** (array of strings) - Required - An array of physical drive identifiers, e.g., @("1I:1:1", "1I:1:2", "1I:1:3"). ### Request Example ```powershell $newLD = New-HPESALogicalDrive ` -Connection $connection ` -ControllerLocation "Slot 0" ` -LogicalDriveName "DataVol01" ` -Raid "Raid5" ` -DataDrive @("1I:1:1", "1I:1:2", "1I:1:3") ``` ### Response #### Success Response (200) - **StatusInfo.Message** (string) - A message indicating the success or failure of the operation. ``` -------------------------------- ### Connect-HPEBIOS / Disconnect-HPEBIOS Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Establishes an authenticated session to the BIOS management interface of HPE ProLiant servers. ```APIDOC ## Connect-HPEBIOS / Disconnect-HPEBIOS ### Description Establishes an authenticated session to the BIOS management interface of HPE ProLiant Gen9, Gen10, and Gen10 Plus servers. Accepts `-DisableCertificateAuthentication` for environments using self-signed certificates. ### Parameters #### Connect-HPEBIOS - **IP** (string) - Required - The IP address of the server's management interface. - **Credential** (object) - Required - A PSCredential object containing username and password. - **DisableCertificateAuthentication** (switch) - Optional - Disables certificate authentication for self-signed certificates. #### Disconnect-HPEBIOS - **Connection** (object) - Required - The connection object obtained from `Connect-HPEBIOS`. ### Request Example (Connect-HPEBIOS) ```powershell Import-Module HPEBIOSCmdlets $credential = Get-Credential $connection = Connect-HPEBIOS -IP "192.168.1.10" -Credential $credential -DisableCertificateAuthentication ``` ### Response Example (Connect-HPEBIOS) ```json { "IP": "192.168.1.10", "Hostname": "server.example.com", "ProductName": "ProLiant DL380 Gen10", "iLOGeneration": 5 } ``` ``` -------------------------------- ### Configure TPM Settings Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Detects the TPM chip type, reads current TPM settings, and configures TPM 2.0 operation, visibility, and UEFI Option ROM measurement on Gen10 servers only. Requires the `HPEBIOSCmdlets` module. ```powershell Import-Module HPEBIOSCmdlets $credential = Get-Credential $connection = Connect-HPEBIOS -IP "192.168.1.10" -Credential $credential -DisableCertificateAuthentication # Check TPM chip type $tpmInfo = Get-HPEBIOSTPMChipInfo -Connection $connection Write-Host "TPM Type: $($tpmInfo.TPMType)" # TPM20, NoTPM, etc. if ($tpmInfo.TPMType -eq "TPM20") { # Read current config $cfg = Get-HPEBIOSTPMConfiguration -Connection $connection $cfg | Select-Object IP, TPM20Operation, TPMVisibility, TPMUEFIOptionROMMeasurement | Format-List # Apply new settings $result = Set-HPEBIOSTPMConfiguration ` -Connection $connection ` -TPM20Operation "NoAction" ` -TPMVisibility "Visible" ` -TPMUEFIOptionROMMeasurement "Enabled" if ($result.Status -ne "Error") { Write-Host "TPM configuration updated." -ForegroundColor Green # Verify Get-HPEBIOSTPMConfiguration -Connection $connection | Select-Object TPM20Operation, TPMVisibility, TPMUEFIOptionROMMeasurement | Format-List } else { Write-Host "Error: $($result.StatusInfo.Message)" -ForegroundColor Red } } Disconnect-HPEBIOS -Connection $connection ``` -------------------------------- ### Manage HPE iLO Firmware Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Retrieve firmware inventory using Get-HPEiLOFirmwareInventory. Update firmware with Update-HPEiLOFirmware, specifying the firmware file location, upload timeout, and TPM status. Supports a timeout between 120-1800 seconds. ```powershell $connection = Connect-HPEiLO -IP "192.168.1.10" -Username "Admin" -Password "P@ssw0rd" ` -DisableCertificateAuthentication # List current firmware versions $inv = Get-HPEiLOFirmwareInventory -Connection $connection $inv.FirmwareInformation | Select-Object Index, FirmwareName, FirmwareVersion | Format-Table -AutoSize # Index FirmwareName FirmwareVersion # ----- ------------ --------------- # 1 iLO 5 2.30 Feb 15 2021 # 2 System ROM U30 v2.22 (11/30/2020) # 3 Redundant System ROM U30 v2.22 (11/30/2020) # Update iLO firmware (upload timeout 3 minutes, server has TPM enabled) $update = Update-HPEiLOFirmware ` -Connection $connection ` -Location "C:\Firmware\ilo5_230.bin" ` -UploadTimeout 180 ` -TPMEnabled:$true ` -Confirm:$false if ($update.Status -eq "ERROR") { Write-Host "Update failed for $($update.IP): $($update.StatusInfo.Message)" -ForegroundColor Red } else { Write-Host "Firmware update initiated: $($update.StatusInfo.Message)" -ForegroundColor Yellow } Disconnect-HPEiLO -Connection $connection ``` -------------------------------- ### Get-HPEBIOSTPMChipInfo / Get-HPEBIOSTPMConfiguration / Set-HPEBIOSTPMConfiguration Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Detects the TPM chip type, reads current TPM settings, and configures TPM 2.0 operation, visibility, and UEFI Option ROM measurement on Gen10 servers only. ```APIDOC ## Get-HPEBIOSTPMChipInfo / Get-HPEBIOSTPMConfiguration / Set-HPEBIOSTPMConfiguration ### Description Detects the TPM chip type, reads current TPM settings, and configures TPM 2.0 operation, visibility, and UEFI Option ROM measurement on Gen10 servers only. ### Parameters #### Path Parameters - **Connection** (object) - Required - Connection object to the HPE iLO interface. - **TPM20Operation** (string) - Optional - Specifies the TPM 2.0 operation mode (e.g., "NoAction", "Clear"). - **TPMVisibility** (string) - Optional - Controls the visibility of the TPM in the UEFI settings (e.g., "Visible", "Hidden"). - **TPMUEFIOptionROMMeasurement** (string) - Optional - Enables or disables the UEFI Option ROM measurement for TPM (e.g., "Enabled", "Disabled"). ### Request Example ```powershell Import-Module HPEBIOSCmdlets $credential = Get-Credential $connection = Connect-HPEBIOS -IP "192.168.1.10" -Credential $credential -DisableCertificateAuthentication # Check TPM chip type $tpmInfo = Get-HPEBIOSTPMChipInfo -Connection $connection Write-Host "TPM Type: $($tpmInfo.TPMType)" # TPM20, NoTPM, etc. if ($tpmInfo.TPMType -eq "TPM20") { # Read current config $cfg = Get-HPEBIOSTPMConfiguration -Connection $connection $cfg | Select-Object IP, TPM20Operation, TPMVisibility, TPMUEFIOptionROMMeasurement | Format-List # Apply new settings $result = Set-HPEBIOSTPMConfiguration ` -Connection $connection ` -TPM20Operation "NoAction" ` -TPMVisibility "Visible" ` -TPMUEFIOptionROMMeasurement "Enabled" if ($result.Status -ne "Error") { Write-Host "TPM configuration updated." -ForegroundColor Green # Verify Get-HPEBIOSTPMConfiguration -Connection $connection | Select-Object TPM20Operation, TPMVisibility, TPMUEFIOptionROMMeasurement | Format-List } else { Write-Host "Error: $($result.StatusInfo.Message)" -ForegroundColor Red } } Disconnect-HPEBIOS -Connection $connection ``` ### Response #### Success Response - **TPMType** (string) - The type of TPM chip detected (e.g., "TPM20", "NoTPM"). - **IP** (string) - The IP address of the server. - **TPM20Operation** (string) - The current TPM 2.0 operation mode. - **TPMVisibility** (string) - The current TPM visibility setting. - **TPMUEFIOptionROMMeasurement** (string) - The current status of UEFI Option ROM measurement. - **Status** (string) - Indicates the status of the operation (e.g., "Success", "Error"). - **StatusInfo** (object) - Contains detailed information about the status, including Message, Category, and AffectedAttribute if an error occurred. #### Response Example ```json { "TPMType": "TPM20", "IP": "192.168.1.10", "TPM20Operation": "NoAction", "TPMVisibility": "Visible", "TPMUEFIOptionROMMeasurement": "Enabled", "Status": "Success", "StatusInfo": null } ``` ``` -------------------------------- ### Process HPE iLO and IML Logs Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Retrieve Integrated Management Log (IML) entries with Get-HPEiLOIML and iLO Event Log entries with Get-HPEiLOEventLog. Both cmdlets output log counts, severity breakdowns, and can filter for critical messages. ```powershell $connection = Connect-HPEiLO -IP "192.168.1.10" -Username "Admin" -Password "P@ssw0rd" ` -DisableCertificateAuthentication # --- Integrated Management Log --- $iml = Get-HPEiLOIML -Connection $connection if ($iml.Status -eq "OK") { Write-Host "$($iml.IP): $($iml.IMLLog.Count) IML entries" # Severity breakdown $iml.IMLLog | Group-Object -Property Severity -NoElement | Format-Table # Critical messages only $iml.IMLLog | Where-Object { $_.Severity -eq "Critical" } | Select-Object Message | Format-List } # --- iLO Event Log --- $evlog = Get-HPEiLOEventLog -Connection $connection if ($evlog.Status -eq "OK") { Write-Host "$($evlog.IP): $($evlog.EventLog.Count) event log entries" $evlog.EventLog | Group-Object -Property Severity -NoElement | Format-Table $evlog.EventLog | Where-Object { $_.Severity -eq "Critical" } | Select-Object Message | Format-List } Disconnect-HPEiLO -Connection $connection ``` -------------------------------- ### Invoke-HPECmdletMigration Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Analyzes an existing PowerShell script that uses older HPE cmdlets and returns a list of `CmdletChangeItem` objects describing required changes for migration. ```APIDOC ## Invoke-HPECmdletMigration ### Description Analyzes an existing PowerShell script that uses older HPE cmdlets and returns a list of `CmdletChangeItem` objects describing every required change (renamed cmdlets, parameters, properties, and values) needed to migrate to the latest HPE module. ### Parameters #### Path Parameters - **ScriptFile** (string) - Required - The path to the legacy PowerShell script file to analyze. - **CmdletModule** (string) - Required - The name of the older HPE cmdlet module to analyze against (e.g., "HPBIOSCmdlets"). ### Request Example ```powershell Import-Module HPEMigrationAdvisoryTool # Analyze a legacy script against the old HPBIOSCmdlets module $changes = Invoke-HPECmdletMigration ` -ScriptFile "C:\Scripts\LegacyBIOSScript.ps1" ` -CmdletModule "HPBIOSCmdlets" # Show all migration suggestions $changes | Format-List ``` ### Response #### Success Response (200) - **CmdletChangeItem** (array of objects) - A list of objects detailing the required changes for migration. - **ChangeType** (string) - The type of change (e.g., "Rename"). - **LineNumber** (int) - The line number in the script where the change is identified. - **LinePosition** (int) - The position within the line where the change is identified. - **Severity** (string) - The severity of the change (e.g., "High", "Medium", "Low"). - **Cmdlet** (object) - Information about the cmdlet change. - **Existing** (string) - The name of the existing cmdlet. - **New** (string) - The name of the new cmdlet. - **Parameter** (array of strings) - List of parameters affected by the change. - **ParameterReference** (array of strings) - References to the parameters. - **Value** (array of strings) - List of values affected by the change. - **ValueReference** (array of strings) - References to the values. ### Methods on CmdletChangeItem Objects - **GetAdditionalMigrationInfo()**: Retrieves all sub-changes for a given item. - **GetReturnVaraible()**: Retrieves the variable name where the cmdlet result is stored. ``` -------------------------------- ### Connect-HPEOA / Get-HPEOAServerStatus Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Connects to an HP c-Class BladeSystem Onboard Administrator and retrieves power, health, and UID LED status for all blade bays. ```APIDOC ## Connect-HPEOA / Get-HPEOAServerStatus ### Description Connects to an HP c-Class BladeSystem OnboardAdministrator and retrieves power, health, and UID LED status for all blade bays. ### Parameters #### Connect-HPEOA Parameters - **InputObject** (object) - Required - An object containing connection details (IP, Username, Password) typically from `Import-Csv`. #### Get-HPEOAServerStatus Parameters - **Bay** (string) - Required - Specifies the blade bay to retrieve status for. Use "All" for all bays. - **Connection** (object) - Required - The connection object obtained from `Connect-HPEOA`. ### Request Example ```powershell Import-Module HPEOACmdlets # Connect using Input.csv (columns: IP, Username, Password) or interactively $csv = Import-Csv ".\Input.csv" $connection = $csv | Connect-HPEOA # Get status for all blade bays $status = Get-HPEOAServerStatus -Bay All -Connection $connection $status.Blade | Select-Object Bay, Power, CurrentWattageUsed, Health, UnitIdentificationLED, VirtualFan | Format-List ``` ### Response #### Success Response (200) - **Blade** (array of objects) - An array containing status information for each blade bay. - **Bay** (int) - The bay number. - **Power** (string) - The power status (e.g., "On"). - **CurrentWattageUsed** (int) - The current wattage used. - **Health** (string) - The health status (e.g., "OK"). - **UnitIdentificationLED** (string) - The status of the Unit Identification LED (e.g., "Off"). - **VirtualFan** (string) - The virtual fan status (e.g., "Normal"). ``` -------------------------------- ### View Parameter Reference Source: https://github.com/hewlettpackard/powershell-proliant-sdk/blob/master/HPEMigrationAdvisoryTool/1.0.0.0/en-US/about_HPEMigrationAdvisoryTool.Help.txt Examine the 'ParameterReference' property to find the line number, line position, and name of parameters that require changes in the script. ```powershell $returnObject [0].ParameterReference ``` -------------------------------- ### Get-HPEiLOIML / Get-HPEiLOEventLog Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Retrieves Integrated Management Log (IML) entries and iLO Event Log entries. ```APIDOC ## Get-HPEiLOIML / Get-HPEiLOEventLog ### Description Retrieves Integrated Management Log (IML) entries and iLO Event Log entries. Outputs log count, unique severity categories, and can filter for critical-severity messages for triage. ### Parameters #### Get-HPEiLOIML - **Connection** (object) - Required - An established connection object to the iLO interface. #### Get-HPEiLOEventLog - **Connection** (object) - Required - An established connection object to the iLO interface. ### Request Example (Get-HPEiLOIML) ```powershell $connection = Connect-HPEiLO -IP "192.168.1.10" -Username "Admin" -Password "P@ssw0rd" -DisableCertificateAuthentication $iml = Get-HPEiLOIML -Connection $connection Disconnect-HPEiLO -Connection $connection ``` ### Request Example (Get-HPEiLOEventLog) ```powershell $connection = Connect-HPEiLO -IP "192.168.1.10" -Username "Admin" -Password "P@ssw0rd" -DisableCertificateAuthentication $evlog = Get-HPEiLOEventLog -Connection $connection Disconnect-HPEiLO -Connection $connection ``` ### Response Example (Get-HPEiLOIML) ```json { "IP": "192.168.1.10", "IMLLog": [ { "Entry": 1, "Severity": "Informational", "Message": "System power on." } ] } ``` ### Response Example (Get-HPEiLOEventLog) ```json { "IP": "192.168.1.10", "EventLog": [ { "Entry": 1, "Severity": "Informational", "Message": "iLO health status is OK." } ] } ``` ``` -------------------------------- ### Review Value References Source: https://github.com/hewlettpackard/powershell-proliant-sdk/blob/master/HPEMigrationAdvisoryTool/1.0.0.0/en-US/about_HPEMigrationAdvisoryTool.Help.txt Use the 'ValueReference' property to locate where in the script file value changes are suggested, providing line number, position, and name. ```powershell $returnObject [0].ValueReference ``` -------------------------------- ### Inspect Value Changes Source: https://github.com/hewlettpackard/powershell-proliant-sdk/blob/master/HPEMigrationAdvisoryTool/1.0.0.0/en-US/about_HPEMigrationAdvisoryTool.Help.txt Check the 'Value' property of the migration result to see suggested changes for existing values, including their existing and new forms. ```powershell $returnObject [0].Value ``` -------------------------------- ### Find-HPEiLO Source: https://context7.com/hewlettpackard/powershell-proliant-sdk/llms.txt Scans a list of IP addresses or a CIDR range to discover reachable iLO hosts on the network without requiring authentication. It outputs objects containing IP, Hostname, and iLOGeneration fields. ```APIDOC ## Find-HPEiLO ### Description Discovers reachable iLO hosts on the network by scanning provided IP addresses or a CIDR range. This cmdlet does not require credentials and is useful for identifying active iLO interfaces before attempting to connect. ### Method `Find-HPEiLO` ### Parameters #### Path Parameters None #### Query Parameters - **Range** (string[]) - Required - A list of IP addresses or a CIDR range to scan. #### Request Body None ### Request Example ```powershell Import-Module HPEiLOCmdlets $inputcsv = Import-Csv ".\iLOInput.csv" $reachable = Find-HPEiLO -Range $inputcsv.IP -WarningAction SilentlyContinue $reachable.IP ``` ### Response #### Success Response (200) - **IP** (string) - The IP address of the reachable iLO host. - **Hostname** (string) - The hostname of the reachable iLO host. - **iLOGeneration** (string) - The generation of the iLO interface. #### Response Example ``` 192.168.1.10 192.168.1.11 ``` ```