: Right-click the computer and select Properties .
if ($recovery) Write-Host "Recovery Key: $($recovery.msFVE-RecoveryPassword)" -ForegroundColor Green else Write-Host "No matching recovery key found for Key ID: $KeyID" -ForegroundColor Red get bitlocker recovery key from active directory