Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Server Management - Remote Server Management
cancel
Showing results for 
Search instead for 
Did you mean: 

Powershell: HPEBIOSCmdlets Module - Set-HPEBIOSProcessorOption always returns an error

Highlighted
TDevWF
Occasional Collector

Powershell: HPEBIOSCmdlets Module - Set-HPEBIOSProcessorOption always returns an error

We have a large number of DL380 G9 servers that are already imaged with Windows Server 2012R2 that we need to disable the HyperThreading on based on application requirements for one of our customers. I have tried both the 1.1.0.0 module and the 2.0.0.0 module to accomplish the task but neither one seems to work for setting the processor options. I can make the initial connection to the server (via the iLO since they are G9) using the module and the Get-HPEBiosProcessorOption command returns the current settings without issue. However, when I try to set the HyperThreading state on the server, the command always fails with a "Sequence contains no elements" error. I have tried sending the connection object in via the pipeline as well just using the command with the -Connection parameter and both fail in the same manner. Here's some simplified sample code to show how I am doing it:

$cred = Get-Credential -Message "Please enter your ID/PW (using @domain format)"

Import-Module HPEBIOSCmdlets -ErrorAction Stop

$server = "ilohostnameorip"   # This is where the actual server's iLO hostname or IP would be used

$Connection = Connect-HPEBIOS -IP $server -Credential $cred -DisableCertificateAuthentication

if ($Connection.IsConnected)
{
 $processoroptions = Get-HPEBIOSProcessorOption -Connection $Connection -OutputType PSObject
        $currentstate = $processoroptions.IntelHyperthreading
        if ($currentstate -eq "Enabled")
 {
 Set-HPEBIOSProcessorOption -Connection $Connection -IntelHyperthreading Disabled
 }
}

Which then returns:

Set-HPEBIOSProcessorOption : Sequence contains no elements
At line:1 char:1
+ Set-HPEBIOSProcessorOption -Connection $Connection -IntelHyperthreadi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Set-HPEBIOSProcessorOption], InvalidOperationException
    + FullyQualifiedErrorId : HPE.BIOS.Cmdlet.SetHPEBIOSProcessorOption

 

Also, I've tried passing $Connection via the pipeline ($Connection | Set-HPEBIOSProcessorOption -IntelHyperThreading Disabled), and I've tried using the other parameters that are listed when I run Get-HPEBIOSProcessorOption, which returns the following (IP and Hostname changed from actual):

IP                        : 10.10.10.25
Hostname                  : ilohostname.domain.com
Status                    : OK
IntelHyperthreading       : Enabled
NoExecuteMemoryProtection : Enabled
ProcessorCoreEnable       : 0
ProcessorX2ApicSupport    : Enabled

I've even tried using the exact command from Get-Help Set-HPEBIOSProcessorOption -Full which was (adjusted for my required settings):

$Connection | Set-HPEBIOSProcessorOption -IntelHyperthreading Disabled -NoExecuteMemoryProtection Enabled -ProcessorCoreEnable 0 -ProcessorX2ApicSupport Enabled

Everything returns the same error. I also tried going back to 1.1.0.0 but, it also produces an error although it's not quite as specific because of the way 1.1.0.0 returns an error vs 2.0.0.0. I would think that if the Get- version of the command works, I should be able to use the Set- version of it. What could be causing the Set-HPEBIOSProcessorOption cmdlet to not function on these G9 servers?

Thanks for any assistance you can provide.

3 REPLIES
B_Rajesh
Occasional Visitor

Re: Powershell: HPEBIOSCmdlets Module - Set-HPEBIOSProcessorOption always returns an error

Thank you TDevWF for notifying the issue.

This is Rajesh Balakrishnan from HPE WIndows PowerShell Team.

We could not able to reproduce the issue at our end. Could you please provide the below informations which will be help us to diagnoise the issue.

1. Send output of Connect-HPEBIOS - to know product name and ROM family information

2. Send output of Get-HPEBIOSModuleVersion

3. Provide the log file. Note: Enable-HPEBIOSLog before Connect-HPEBIOS

Regards

Rajesh Balakrishnan

 

 

TDevWF
Occasional Collector

Re: Powershell: HPEBIOSCmdlets Module - Set-HPEBIOSProcessorOption always returns an error

Ok, per your instruction, I ran Enable-HPEBIOSLog first. I then created my connection ($Connection = Connect-HPEBIOS -IP ourserver.ourdomain.com -Credential $cred -DisableCertificateAuthentication) and this is the information from the connection object (IPs, Hostnames and Company information changed to generic values for security):

DisableServerCertificateAuthenticationFlag : True
Location                                   : https://10.xx.xx.xxx/rest/v1/SessionService/Sessions/myid%40ourdomain.com5a0bfcc694fdf3b7
RootUri                                    : https://10.xx.xx.xxx/rest/v1
RootData                                   : @{@odata.context=/redfish/v1/$metadata#SessionService/Sessions/Members/$entity;
                                             @odata.id=/redfish/v1/SessionService/Sessions/myid%40ourdomain.com5a0bfcc694fdf3b7/;
                                             @odata.type=#Session.1.0.0.Session; Description=Manager User Session;
                                             Id=myid%40ourdomain.com5a0bfcc694fdf3b7; Name=User Session; Oem=; Type=Session.1.0.0;
                                             UserName=myid@ourdomain.com; links=}
AttributeRegistry                          : HpBiosAttributeRegistryP89.1.1.30
ConnectionType                             : REST
IP                                         : 10.xx.xx.xxx
Hostname                                   : ourserver.ourdomain.com
IsConnected                                : True
Username                                   : myid@ourdomain.com
ProductName                                : ProLiant DL380 Gen9
CurrentROMFamily                           : P89
CurrentROMDate                             : 09/13/2016
CurrentROMVersion                          : P89 v2.30 (09/13/2016)
BackupROMFamily                            : P89
BackupROMDate                              : 09/13/2016
BackupROMVersion                           : P89 v2.30 (09/13/2016)
ProcessorInfo                              : Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz

I then ran Get-HPEBIOSModuleVersion and got this result:

Name                    : HPEBIOSCmdlets
Path                    : C:\Tools\build scripts\Hyperthreading\HPEBIOSCmdlets\HPEBIOSCmdlets.dll
Description             : Scripting Tools for Windows PowerShell : BIOS Cmdlets creates an interface to HPE BIOS ROM-Based Setup Utilty (RBSU) or
                          UEFI System Utilities. These cmdlets can be used to configure the BIOS settings on HPE ProLiant servers.
GUID                    : b37fea1c-1be5-42a6-bbc9-a453018b2a0f
CurrentUICultureName    : en-US
CurrentUICultureVersion : 2.0.0.0
Version                 : 2.0.0.0
DotNetVersion           :
PSVersion               : @{PSVersion=5.0.10586.117; PSCompatibleVersions=System.Version[]; BuildVersion=10.0.10586.117; CLRVersion=4.0.30319.42000;
                          WSManStackVersion=3.0; PSRemotingProtocolVersion=2.3; SerializationVersion=1.1.0.1}
OSVersion               : @{Caption=Microsoft Windows 7 Enterprise ; CSDVersion=Service Pack 1; Version=6.1.7601; BuildNumber=7601}
CCGVersion              : 1.1.0.0
AvailableUICulture      : {@{UICultureName=en-US; UICultureVersion=2.0.0.0}, @{UICultureName=zh-CN; UICultureVersion=1.1.0.1}, @{UICultureName=ja-JP;
                          UICultureVersion=1.1.0.1}}

I then ran Get-HPEBIOSProcessorOption -Connection $Connection and got:

IP                        : 10.xx.xx.xxx
Hostname                  : ourserver.ourdomain.com
Status                    : OK
IntelHyperthreading       : Disabled
NoExecuteMemoryProtection : Enabled
ProcessorCoreEnable       : 0
ProcessorX2ApicSupport    : Enabled

I then ran Set-HPEBIOSProcessorOption -Connection $Connection -IntelHyperthreading Disabled and got:

Set-HPEBIOSProcessorOption : Sequence contains no elements
At line:1 char:1
+ Set-HPEBIOSProcessorOption -Connection $Connection -IntelHyperthreadi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Set-HPEBIOSProcessorOption], InvalidOperationException
    + FullyQualifiedErrorId : HPE.BIOS.Cmdlet.SetHPEBIOSProcessorOption

 

Here is the output of the log from the modules:

2017-11-15 08:36:50,669 HPE.Logging.Logger.LogMessage INFO - Parameter processing started.
2017-11-15 08:36:50,732 HPE.Logging.Logger.LogMessage INFO - Processing parameter - IP.
2017-11-15 08:36:50,732 HPE.Logging.Logger.LogMessage INFO - Processing parameter - Username.
2017-11-15 08:36:50,732 HPE.Logging.Logger.LogMessage INFO - Processing parameter - Password.
2017-11-15 08:36:50,732 HPE.Logging.Logger.LogMessage INFO - Processing parameter - AdminPassword.
2017-11-15 08:36:50,732 HPE.Logging.Logger.LogMessage INFO - Processing parameter - ClientLoggedInUserPassword.
2017-11-15 08:36:50,747 HPE.Logging.Logger.LogMessage INFO - Processing parameter - Credential.
2017-11-15 08:36:50,747 HPE.Logging.Logger.LogMessage INFO - Processing parameter - DisableCertificateAuthentication.
2017-11-15 08:36:50,747 HPE.Logging.Logger.LogMessage INFO - Processing parameter - Port.
2017-11-15 08:36:50,747 HPE.Logging.Logger.LogMessage INFO - Processing parameter - Timeout.
2017-11-15 08:36:50,841 HPE.Logging.Logger.LogMessage INFO - Executing the cmdlets with 1 task serially.
2017-11-15 08:36:50,857 HPE.Logging.Logger.LogMessage INFO - Connect-HPEBIOS ProcessCommand() -- Starts
2017-11-15 08:36:50,857 HPE.Logging.Logger.LogMessage INFO - GetCommunicationModel() -- Start
2017-11-15 08:36:50,857 HPE.Logging.Logger.LogMessage INFO - GetCommunicationProtocolType() -- Start
2017-11-15 08:36:51,450 HPE.Logging.Logger.LogMessage INFO - GetCommunicationProtocolType() -- End
2017-11-15 08:36:51,450 HPE.Logging.Logger.LogMessage INFO - LoadCmdletParameterConfigurationData() -- Start
2017-11-15 08:36:51,465 HPE.Logging.Logger.LogMessage INFO - LoadCmdletParameterConfigurationData() -- End
2017-11-15 08:36:51,465 HPE.Logging.Logger.LogMessage INFO - GetCommunicationModel() -- End
2017-11-15 08:36:51,481 HPE.Logging.Logger.LogMessage INFO - BuildCommand() -- Start
2017-11-15 08:36:51,481 HPE.Logging.Logger.LogMessage INFO - Connect() -- Start
2017-11-15 08:36:51,481 HPE.Logging.Logger.LogMessage INFO - CreateConnection() -- Start
2017-11-15 08:37:27,555 HPE.Logging.Logger.LogMessage INFO - InitializeConnectionProperties() -- Start
2017-11-15 08:37:29,724 HPE.Logging.Logger.LogMessage INFO - InitializeConnectionProperties() -- End
2017-11-15 08:37:29,724 HPE.Logging.Logger.LogMessage INFO - CreateConnection() -- End
2017-11-15 08:37:29,739 HPE.Logging.Logger.LogMessage INFO - Connect() -- End
2017-11-15 08:37:29,739 HPE.Logging.Logger.LogMessage INFO - BuildCommand() -- End
2017-11-15 08:37:29,739 HPE.Logging.Logger.LogMessage INFO - Connect-HPEBIOS ProcessCommand() -- Ends
2017-11-15 08:43:11,024 HPE.Logging.Logger.LogMessage INFO - Parameter processing started.
2017-11-15 08:43:11,040 HPE.Logging.Logger.LogMessage INFO - Processing parameter - Connection.
2017-11-15 08:43:11,040 HPE.Logging.Logger.LogMessage INFO - Processing parameter - OutputType.
2017-11-15 08:43:11,040 HPE.Logging.Logger.LogMessage INFO - Executing the cmdlets with 1 task serially.
2017-11-15 08:43:11,056 HPE.Logging.Logger.LogMessage INFO - Get-HPEBIOSProcessorOption ProcessCommand() -- Starts
2017-11-15 08:43:11,056 HPE.Logging.Logger.LogMessage INFO - GetCommunicationModel() -- Start
2017-11-15 08:43:11,056 HPE.Logging.Logger.LogMessage INFO - GetCommunicationModel() -- End
2017-11-15 08:43:11,056 HPE.Logging.Logger.LogMessage INFO - BuildCommand() -- Start
2017-11-15 08:43:11,056 HPE.Logging.Logger.LogMessage INFO - InitializeConnectionInfo() -- Start
2017-11-15 08:43:11,056 HPE.Logging.Logger.LogMessage INFO - ReadBIOSRegistryData() -- Start
2017-11-15 08:43:12,366 HPE.Logging.Logger.LogMessage INFO - ReadBIOSRegistryData() -- End
2017-11-15 08:43:12,413 HPE.Logging.Logger.LogMessage INFO - InitializeConnectionInfo() -- End
2017-11-15 08:43:12,818 HPE.Logging.Logger.LogMessage INFO - BuildCommand() -- End
2017-11-15 08:43:12,818 HPE.Logging.Logger.LogMessage INFO - Get-HPEBIOSProcessorOption ProcessCommand() -- Ends
2017-11-15 08:44:16,081 HPE.Logging.Logger.LogMessage INFO - Parameter processing started.
2017-11-15 08:44:16,081 HPE.Logging.Logger.LogMessage INFO - Processing parameter - Connection.
2017-11-15 08:44:16,081 HPE.Logging.Logger.LogMessage INFO - Processing parameter - AMDCorePerformanceBoost.
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - Processing parameter - IntelHyperthreading.
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - Processing parameter - NoExecuteMemoryProtection.
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - Processing parameter - NoExecutePageProtection.
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - Processing parameter - ProcessorCoreEnable.
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - Processing parameter - ProcessorX2ApicSupport.
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - Executing the cmdlets with 1 task serially.
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - Set-HPEBIOSProcessorOption ProcessCommand() -- Starts
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - GetCommunicationModel() -- Start
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - GetCommunicationModel() -- End
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - ValidateParameterRecord() -- Start
2017-11-15 08:44:16,097 HPE.Logging.Logger.LogMessage INFO - ValidateParameterRecord() -- End
2017-11-15 08:44:16,112 HPE.Logging.Logger.LogMessage INFO - BuildCommand() -- Start
2017-11-15 08:44:16,112 HPE.Logging.Logger.LogMessage INFO - InitializeConnectionInfo() -- Start
2017-11-15 08:44:16,112 HPE.Logging.Logger.LogMessage INFO - ReadBIOSRegistryData() -- Start
2017-11-15 08:44:17,267 HPE.Logging.Logger.LogMessage INFO - ReadBIOSRegistryData() -- End
2017-11-15 08:44:17,282 HPE.Logging.Logger.LogMessage INFO - InitializeConnectionInfo() -- End
2017-11-15 08:44:17,282 HPE.Logging.Logger.LogMessage INFO - ValidateParameterAndValue() -- Start
2017-11-15 08:44:17,813 HPE.Logging.Logger.LogMessage INFO - ValidateParameterAndValue() -- End
2017-11-15 08:44:17,828 HPE.Logging.Logger.LogMessage INFO - DependencyCheck() -- Start
2017-11-15 08:44:17,828 HPE.Logging.Logger.LogMessage INFO - ReadPendingFeatureValue() -- Start
2017-11-15 08:44:18,187 HPE.Logging.Logger.LogMessage INFO - ReadPendingFeatureValue() -- End
2017-11-15 08:44:18,187 HPE.Logging.Logger.LogMessage INFO - ReadPendingFeatureValue() -- Start
2017-11-15 08:44:18,515 HPE.Logging.Logger.LogMessage INFO - ReadPendingFeatureValue() -- End
2017-11-15 08:44:18,515 HPE.Logging.Logger.LogMessage INFO - DependencyCheck() -- End
2017-11-15 08:44:18,795 HPE.Logging.Logger.LogMessage ERROR - Sequence contains no elements

Please let me know if there is any additional information that I can provide.

Thanks,

TDevWF

 

B_Rajesh
Occasional Visitor

Re: Powershell: HPEBIOSCmdlets Module - Set-HPEBIOSProcessorOption always returns an error

Thank you TDevWF for provding the required informations.

We have reproduced this issue at our enivornment. It is a bug in HPEBIOSCmdlets module for directory group users while settings the BIOS configuration. In this case, you can read the BIOS settings, but cannot change the BIOS settings using Directory group users. We will fix this issue in upcoming HPEBIOSCmdlets version.

Workaround:

Use local iLO user with 'iLO Config Privilege' to set the BIOS settings.

Regards

Rajesh Balakrishnan