9 lines
364 B
PowerShell
9 lines
364 B
PowerShell
Get-Content C:\Scripts\Secret\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]
|
|
}
|
|
$mystring
|
|
$SecureString = ConvertTo-SecureString $mystring -AsPlainText -Force
|
|
Unlock-BitLocker -MountPoint "E:" -Password $SecureString
|
|
|