Recover Bitlocker Recovery Password Powershell

If you use Bitlocker with Active Directory Recovery, then you can quickly recover the recovery password from AD using Powershell. Yes there is an RSAT plugin that will do the same thing, but I have been on servers that do not have this and I needed the password quick.

$Bitlocker = Get-ADObject -Filter {name -like <first 8 characters of recovery key> -and ObjectClass -eq 'msFVE-RecoveryInformation'} -Properties msFVE-RecoveryPassword | Select-Object msFVE-RecoveryPassword | Out-String
$keyString = $Bitlocker
 $keyString = $keyString.replace('msFVE-RecoveryPassword', '')
 $keyString = $keyString.replace('--', '')
 $keyString = $keyString.replace('
 ', '')
Write-Host $keyString

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.