Skip to content

Fix GetSettings - Ignore nameless values & trim values.#11

Closed
CharlesNRU wants to merge 2 commits into
ConfigJon:masterfrom
CharlesNRU:master
Closed

Fix GetSettings - Ignore nameless values & trim values.#11
CharlesNRU wants to merge 2 commits into
ConfigJon:masterfrom
CharlesNRU:master

Conversation

@CharlesNRU

Copy link
Copy Markdown

Hello,

2 things in this pull request:

  1. On some models, GetSettings would return a bunch of BIOS settings which have a name value of a space character. So I filter those out.
  2. When trying to identify the setting, sometimes there is a space at the beginning of the value so it cannot identify correctly the current value so I added a Trim() to the value to remove the extra spaces.

@CharlesNRU

Copy link
Copy Markdown
Author

Added a commit because I found a similar issue with getting current values before setting BIOS settings.

@ConfigJon

Copy link
Copy Markdown
Owner

Thanks for catching this and apologies for the very long delay. A clean merge wasn't possible because the script was renamed during the v2 modernization (HP/Manage-HPBiosSettings.ps1 > Manage-HPBiosSettings-WMI.ps1), but your diagnosis was right and the bug was still present in v2.3.0.

The fix is included in v2.3.1 (commit 4c3688e). Once I started applying it I noticed the same asterisk-prefix-with-leading-whitespace pattern appeared in a few more places. HP Sure Admin detection in both Manage-HPBiosSettings-WMI.ps1 and Manage-HPBiosPasswords-WMI.ps1, plus the enumeration parsing in the new Manage-HPBiosSettings-HPCMSL.ps1 — so the same trim-at-source approach was extended to those sites too. You're credited by name in each affected script's changelog entry. Closing this PR as incorporated.

@ConfigJon ConfigJon closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants