Files
wLocal/PS/pUnlock.ps1
USER 18487e6ce1 .
2024-03-14 21:52:46 +00:00

10 lines
402 B
PowerShell

Get-Content C:\Scripts\Secrets\unlock.txt | Where-Object {$_.length -gt 0} | Where-Object {!$_.StartsWith("#")} | ForEach-Object {
$var = $_.Split('=',2).Trim()
New-Variable -Scope Script -Name $var[0] -Value $var[1]
}
$SecureString = ConvertTo-SecureString $mystring -AsPlainText -Force
Unlock-BitLocker -MountPoint "F:" -Password $SecureString
#### in unlock.txt put below
###mystring=xxxxx