Powershell Script to Export All Bitlocker Key to Local Disk

Sometimes we need to save bitlocker key in our environment locally to do some backup, comparison,etc. Here is a simple powershell script to export all the Bitlocker Keys to C:\.

Please run this script with network account has access to Bitlocker Keys in your environment.

Also, needs to install Quest AD plugin for your powershell.

$Domain = your company domain

$FileName = “BitLocker_$(Get-Date -f ‘yyyy-MM-dd').csv”

$objects = Get-QADObject -SearchRoot $Domain -LdapFilter ‘(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=2))(objectcategory=msFVE-RecoveryInformation)' -SizeLimit 0 -IncludedProperties cn,name,type,msFVE-RecoveryGuid,msFVE-RecoveryPassword,ParentContainer,instanceType,objectCategory,objectClass | export-csv -NoTypeInformation -Path “C:\$($FileName)”