Start a Conversation

Unsolved

P

1 Rookie

 • 

2 Posts

80

February 9th, 2024 12:07

BIOS PW containing the "-" character

I have a lot of devices provided with a BIOS Password containing the minus "-" character.
When I try to clear or modify this password with powershell I always getting the error msg "Incorrect password provided!"
When I manually change the password to something else without the "-" the same commands are working without problems.

So my question is if that is a problem in general with special characters or is it eventually a keyboard problem with international keyboards? In this case "german"

Thank you!

Moderator

 • 

8.9K Posts

February 9th, 2024 16:36

PuDerBaer,

 

I don't think it is a keyboard issue, I believe it is an unsupported character with powershell. 

You can also find the steps and commands for the password here

 

Let me know if this helps.

 

 

1 Rookie

 • 

2 Posts

February 13th, 2024 09:44

Hi Chris,

thank you for your answer!

I tried all the steps from this site link and without the "-" they worked fine, but not when the "-" is included.

Because with all PS commands the password is wrapped in "" I thought the password should be handeled as a string so it will not be mixed up with PS commands? 

Thank you,

best regards

Moderator

 • 

3.3K Posts

February 13th, 2024 14:17

Hi,

 

 

The issue you're experiencing could be due to how PowerShell handles special characters, particularly the "-" character, when passing it as an argument to commands. It's possible that PowerShell might be interpreting the "-" character in a special way, causing the BIOS password to be incorrectly parsed.

One workaround you could try is to enclose the password containing the "-" character in single or double quotes when passing it as an argument to PowerShell commands. This can help ensure that PowerShell treats the entire password string as a single entity and doesn't interpret any special characters within it.

For example:

Clear-BIOSPassword -Password 'your-password-with-minus-character'
 

or

Clear-BIOSPassword -Password "your-password-with-minus-character"
 

If the issue persists even after trying this workaround, it's possible that there might be some compatibility or encoding issues specific to your environment, such as with international keyboards.

No Events found!

Top