stolen from TRMM, then edited to exit 1 for triggering the activate task
This commit is contained in:
Upgrayedd 2024-11-02 16:14:37 -05:00
parent d429c3464b
commit 1a385479b0

19
Bitlocker Get Keys C.ps1 Normal file
View file

@ -0,0 +1,19 @@
param(
[switch]$KeyOnly = $false
)
if ($KeyOnly) {
(Get-BitLockerVolume -MountPoint C).KeyProtector.RecoveryPassword
}
else {
$protectors = manage-bde -protectors C: -get
if ($protectors -match 'ERROR' ) {
$protectors
exit 1
}
else {
$protectors
}
}