This commit is contained in:
USER
2024-01-06 21:12:18 +00:00
parent 76a6f60ed1
commit f15d6623e8
2 changed files with 126 additions and 0 deletions

8
PS/pUnlockUSB.ps1 Normal file
View File

@ -0,0 +1,8 @@
Get-Content C:\Scripts\Secrets\unlockusb.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 "E:" -Password $SecureString