RMM/Bitlocker Get Keys C.ps1

20 lines
316 B
PowerShell
Raw Permalink Normal View History

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