Create this powershell script:
# Ensure the BitLocker module is imported
Import-Module BitLocker
# Retrieve all BitLocker volumes
$bitLockerVolumes = Get-BitLockerVolume
# Iterate through each BitLocker-protected volume
foreach ($volume in $bitLockerVolumes) {
$mountPoint = $volume.MountPoint
$keyProtector = $volume.KeyProtector | Where-Object { $_.KeyProtectorType -eq ‘RecoveryPassword’ }
$recoveryPassword = $keyProtector.RecoveryPassword
if ($recoveryPassword) {
Write-Output “Drive $mountPoint – Recovery Password: $recoveryPassword”
} else {
Write-Output “Drive $mountPoint does not have a recovery password protector.”
}
}