.
This commit is contained in:
8
PS/pUnlock.ps1
Normal file
8
PS/pUnlock.ps1
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
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
|
||||||
|
|
||||||
Reference in New Issue
Block a user