RMM/Bitlocker Get Keys C.ps1
Upgrayedd 1a385479b0 add file
stolen from TRMM, then edited to exit 1 for triggering the activate task
2024-11-02 16:14:37 -05:00

20 lines
316 B
PowerShell

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
}
}