.
This commit is contained in:
8
PS/pUnlockUSB.ps1
Normal file
8
PS/pUnlockUSB.ps1
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user