cancel
Showing results for 
Search instead for 
Did you mean: 
ArchivedThis topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
sloter
New member
2 1 0 0
Message 1 of 6
3,728
Flag Post

BIOS Cmdlets Powershell

HP Recommended
HP DL360P GEN8
Other

Hi,

 

So I have a load of HP DL360P Gen8. I am trying to use the HP BIOS Cmdlets to configure the BIOS settings but I'm not having much luck.

 

I have successfully created the PE image on a USB pen using the New-HPBIOSCustomWinPEImage and I have booted up the server to this image. I have done this because the servers will eventually be running ESX not windows.

 

I've set all the iLo to defaults and only changed the administrator password to password

 

I've downloaded the BIOS cmdlets and installed them.

 

When I try and connect to the server I get the following error: I have tried it in a script and it did not work so I tried it just running the Connect-HPBIOS command in powershell and once I input the password it just hangs for about a minute then errors with the following error:

 

 

PS C:\> Connect-HPBIOS
Target IP Address/Hostname not provided...
Please enter IP or Hostname for remote iLO/Windows: 192.168.0.11
Do you want to add more IPs or Hostnames? (Y/N): n
Username not provided...
Please enter Username for 192.168.0.11 : Administrator
Password not provided...
Please enter Password for 192.168.0.11: ********

Connect-HPBIOS : Failed for 192.168.0.11:Fail to execute commands on target system.
At line:1 char:1
+ Connect-HPBIOS
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Connect-HPBIOS], HPBIOSException
    + FullyQualifiedErrorId : HPBIOSCmdlets.ConnectHPBIOS

PS C:\Users\>

 

 

What am I doing wrong? If I enter the wrong password on purpose I get the following error so I know it's talking to the server!

 

Connect-HPBIOS : Failed for 192.168.0.11:Permission denied (password).
At line:1 char:1
+ Connect-HPBIOS
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Connect-HPBIOS], HPBIOSException
    + FullyQualifiedErrorId : HPBIOSCmdlets.ConnectHPBIOS

 

The IP address I am using is the address of the iLO card which I believe to be correct if you are booting to the PE image?

 

Do I need to turn something on in the iLO? someone has to have had this before?

 

Thanks

0 Kudos
5 REPLIES 5
greenbergmethew
Level 5
141 127 9 85
Message 2 of 6
Flag Post
HP Recommended

HP BIOS Cmdlets are compatible with both WinPE and standard Windows installations meaning that the BIOS cmdlets can be used during system deployment to adjust and set BIOS settings on a host.
The bulk of the cmdlets are Get- and Set- verb cmdlets, as you would expect. These cmdlets allow you to retrieve and set specific settings with each cmdlet. All of the BIOS cmdlets are listed at the end of this post as an overview.

Connecting & Disconnecting:
Connecting to a host is simple. According to the documentation, the syntax for a connection is very similar to connecting to vCenter Server using PowerCLI.

$variable = Connect-HPBIOS 192.168.0.100 -Username "username" -Password "password"

Storing the connection in a variable for reference also allows you the benefit of establishing multiple sessions to different hosts. This could be useful for setting settings across multiple hosts with a simple For loop in PowerShell.

Disconnect-HPBIOS $variable

Cmdlet-page0004.jpg

0 Kudos
sloter
Author
New member
2 1 0 0
Message 3 of 6
Flag Post
HP Recommended

Thanks, I know about the get and set. it's the connect that I can't get working.

0 Kudos
greenbergmethew
Level 5
141 127 9 85
Message 4 of 6
Flag Post
HP Recommended

BIOS settings using PowerShell much easier then it used to be. The reason is that HP have released a PowerShell module that makes it possible to modify many of the settings, it actually also works remotely and even in WinPE.

 

 

The little trick

It seems to be some confusion on how these CmdLets work, but it is very simple. The first command you need to execute is the Connect- CmdLet and that also applies when you run the command on the localhost and a connection does require name and password, this part actually sucks. it would have been so much smarter of HP to accept that commands that are executed locally did not ask for credentials, but that is how it works right now.

The Cool thing

It is possible to connect to multiple servers at the same time and then all commands will be executed in parallel

Connect to the BIOS:


$ComputerName = "SRV01"
$UserName = "Administrator"
$Password = "P@ssw0rd"
$Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList "$COMPUTERNAME\$UserName", ($Password | ConvertTo-SecureString -AsPlainText -Force)
$Con = Connect-HPBIOS -IP $env:COMPUTERNAME -Credential $Credentials -ErrorAction Stop
Configure for Tree Hugging Mode


Set-HPBIOSPowerProfile -Profile Minimum_Power -Connection $Con
Set-HPBIOSPowerRegulator -Regulator Dynamic_Power_Savings -Connection $Con
Write-Output "$ScriptName - HP PowerProfile is set to $((Get-HPBIOSPowerProfile -Connection $Con).HPPowerProfile)"
Write-Output "$ScriptName - HP PowerRegulator is set to $((Get-HPBIOSPowerRegulator -Connection $Con).HPPowerRegulator)"
Configure for High Performance


Set-HPBIOSPowerProfile -Profile Maximum_Performance -Connection $Con
Set-HPBIOSPowerRegulator -Regulator Static_High_Performance -Connection $Con
Write-Output "$ScriptName - HP PowerProfile is set to $((Get-HPBIOSPowerProfile -Connection $Con).HPPowerProfile)"
Write-Output "$ScriptName - HP PowerRegulator is set to $((Get-HPBIOSPowerRegulator -Connection $Con).HPPowerRegulator)"

 

image9.png

You have to refer that hp bios windows power shell.

 

This information is very useful for your issues.

hpal07010
New member
1 1 0 0
Message 5 of 6
Flag Post
HP Recommended

@sloter Did you ever figure this out? I have same issue

0 Kudos
noPanic
New member
0 1 0 0
Message 6 of 6
Flag Post
HP Recommended

Same Issue here. Does anyone found a solution?

0 Kudos
ArchivedThis topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation