Unsolved
1 Rookie
•
1 Message
0
2423
January 7th, 2021 09:00
Change BIOS setting with Admin password set
Hello,
Problem 1
I have created a script to make BIOS changes to Dell PC's in my labs, which works well and sets Admin and lockout password at the end of the script. Although, I'm not thrilled about showing the BIOS password in the script and must delete the script after deployment.
Problem 2
However I do not know enough scripting to make the same changes (run same script) to Pc's that have the Admin and Lockout passwords already set. All Pc's have the same BIOS password.
I do not want to use this;
si -path DellSmbios:\PostBehavior\Fastboot "Auto" -password "Beer"
I found a few search results that allow me to successfully create an a secure and an encrypted password file, but I don't know how to include or provide the password to my "Set-item" in my script file.
ConvertTo-SecureString "Beer" -AsPlaintext -Force | ConvertFrom-SecureString | Out-File C:\dell\BIOS-Pwd.txt
I also understand their is a Read.dellBiospassword, but do not know how to use that either.
Any help would be great,
Mike
DJITS
4 Posts
0
January 15th, 2021 08:00
Mike,
I might be able to help you.
You need your password and then open powershell
First run:
Read-Host "Enter Admin Password" -AsSecureString | ConvertFrom-SecureString | Out-File "C:\Temp\Bios.txt" (It will ask you for the password so enter the password)
You now have an encrypted password in the Bios.txt file
If you want to use it you need to have the file on the system. For example C:\Temp\Bios.txt
Now run:
$pw = Get-Content "C:\Temp\Bios.txt" | ConvertTo-SecureString
You now have a variable that you can use in the Dell module. As example:
Set-Item -Path DellSMBIOS:\VirtualizationSupport\TrustExecution enabled -PasswordSecure $pw
Hope this helps you out
Regards,
DJITS
AFD524
1 Message
0
February 23rd, 2021 15:00
Hi,
I'm having an issue with this, when I run this command it sets the admin password as System.Security.SecureString and not what the secure string actually is.
In my code we have a password file and a key file. Were using the following code:
$pw = ( (Get-Content $PasswordFile) | ConvertTo-SecureString -Key (Get-Content $KeyFile) )
Later we go to use that $pw
Set-Item -Path DellSMBIOS:\Security\Adminpassword $pw
The admin password then sets to "System.Security.SecureString"
johanpol
26 Posts
0
February 24th, 2021 06:00
I have the same issue....password will become: "System.Security.SecureString"