Checks protected drives
Each BitLocker volume returned by Windows is examined. The script records drives whose BitLocker protection status is enabled.
Windows Utility
BitLocker Recovery Key is a free PowerShell utility that checks the BitLocker volumes visible from the current Windows installation, collects available recovery passwords from protected drives, and saves the results to a local text file for easy reference.
Overview
The script uses Windows' Get-BitLockerVolume command to enumerate BitLocker volumes. It processes volumes whose protection status is On and looks specifically for key protectors of type RecoveryPassword.
Each BitLocker volume returned by Windows is examined. The script records drives whose BitLocker protection status is enabled.
For each protected volume, the script filters its key protectors for the RecoveryPassword type and records any recovery password returned by Windows.
The results are written to BitLockerRecoveryKey.txt in the same directory as the script. If the script directory is unavailable, it uses the current working directory.
The script reads BitLocker volume and protector information and writes a text file. It does not contain commands to enable, disable, suspend, decrypt, or reconfigure BitLocker.
How It Works
RecoveryPassword protectors returned by Windows are added to the output.BitLockerRecoveryKey.txt beside the script and displays the saved path.Output
The output is intentionally simple so it can be opened in any text editor. Each protected drive gets a drive heading, followed by any recovery password returned for that volume.
Behavior
The drive is added to the output. If Windows reports one or more recovery-password protectors, those passwords are written under that drive.
The script displays a message that no BitLocker-protected drives or recovery keys were found and does not create the normal results file.
The script can still add the drive heading because protection is enabled, but no recovery-password line will be added unless Windows returns a protector of type RecoveryPassword.
The script catches the error and displays a message beginning with “Failed to retrieve the BitLocker recovery key” followed by the Windows/PowerShell error message.
FAQ
No. The script only reads BitLocker information and saves output to a text file.
No. There are no decryption commands in the script.
Normally beside the PowerShell script as BitLockerRecoveryKey.txt. If PowerShell cannot determine the script directory, the current working directory is used instead.
No. This utility only reads recovery-password protectors returned from the BitLocker volumes available inside the current Windows installation.
No. The script specifically filters for the RecoveryPassword protector type.
The file can contain the recovery password used to unlock a BitLocker-protected drive, so it should be treated as sensitive information.