Unlock Bitlocker protected drive using the recoverykey.


I modified the basic example when you want to unlock your usb protected drive with bitlocker

[pre]$txt = Get-Content “C:\temp\test.txt”
$securestring = ConvertTo-SecureString $txt -AsPlainText -Force
Unlock-BitLocker -Mountpoint “E:” -Password $securestring[/pre]

this works like a charm however I’m not sure on how to proceed with the recoverykey since in the help it only mention recoverykeypath and recoverypassword.

when the user lost it’s password and was wise enough to create a recovery key how do I need to create a piece of code that uses the recoverykey to unlock the protected drive and prompts to change your password into a new one?

thanks for your help in this