Get Bitlocker Keys

This one has been really handy.

$BitlockerVolumers = Get-BitLockerVolume
$BitlockerVolumers |
ForEach-Object {
$MountPoint = $_.MountPoint
$RecoveryKey = string.RecoveryPassword
if ($RecoveryKey.Length -gt 5) {

Write-Output ServerUtilsSetMachineProperty(@ThisMachine(),BitLocker,$RecoveryKey)

        }        
}
1 Like