Related to: https://learn.microsoft.com/en-us/powershell/module/bitlocker/unlock-bitlocker?view=windowsserver2022-ps
$SecureString = ConvertTo-SecureString "fjuksAS1337" -AsPlainText -Force
Unlock-BitLocker -MountPoint "E:" -Password $SecureString
That I want to use it in a .ps1 script file ( without ask for the user password ). The user is only me and it's on my home computer.
My question: Is it possible to replace "fjuksAS1337" by an Hash of "fjuksAS1337" or something less obvious than the literal text password in the script?
Thanks for your help!
You could save your credentials into an xml file inside some folder where you have set permissions to read/modify only to you like
Then in your script use it as