PowerTip: Use PowerShell to Write BitLocker Recovery Key to Text File

Summary: Use Windows PowerShell to write your BitLocker recovery key to a text file.

Hey, Scripting Guy! Question If I forgot to save my BitLocker recovery key when I enabled BitLocker on my laptop, how can I use Windows PowerShell to write it to a text file so I can copy it to a USB key for safe keeping?

Hey, Scripting Guy! Answer From an elevated Windows PowerShell console, use the Get-BitLockerVolume function, select -MountPoint C, choose the KeyProtector and the RecoveryPassword properties, and then redirect the output to a text file:

(Get-BitLockerVolume -MountPoint C).KeyProtector.recoverypassword > c:\bitlockerkey.txt

Comments (3)

  1. Stygen says:

    very helpful 🙂

  2. Ed Wilson says:

    @Stygen thank you. I am glad you liked it.

  3. anon says:

    What version of powershell does this require?

Skip to main content