Hello,
I'm trying to put something together, so I can with ease change BIOS password.
The script is supposed to check the BIOS current password and then change it to a new password
Function Clear-DellAdminPassword {
BEGIN {
# Define the path to cctk.exe
$cctkPath = "X:\bios\dell\cctk.exe"
# Array of known passwords
$KnownPasswords = @("password1", "password2", "password3") # Replace these with your actual passwords
}
PROCESS {
foreach ($pwd in $KnownPasswords) {
# Command to reset BIOS admin password using cctk.exe
$command = "$cctkPath --setuppwd=$pwd --valsetuppwd=$pwd"
# Execute the command and capture the result
$result = Invoke-Expression $command
# Check the result (modify this check based on the actual output of cctk.exe when successful)
if ($result -like "*success*") {
Write-Output "Password cleared successfully using $pwd."
return
}
}
Write-Warning "Failed to clear the password using known passwords."
}
END
}
Found some inspiration here:
https://www.powershellgallery.com/packages/DellBIOSProvider/2.7.0/Content/Clear-DellAdminPassword.ps1
I tried the script first without integrating the cctk, and ran it cause in the task sequence without any errors. Same thing with cctk, no compliments and it didn't clear the password.
cctk.exe --syspwd=newpassword --valsyspwd=oldpassword