This works even if the PC is dead or offline. Use this method when possible. Don't wait for a boot-loop emergency to figure this out. Test Method 1 on a lab machine today. Better yet, script Method 3 into a weekly audit report so you always know where your recovery keys are.
else [PSCustomObject]@Computer=$pc; RecoveryKey=$null; Status="Offline" powershell get bitlocker recovery key remote computer
Do you pull keys from AD, Entra ID, or directly from the remote client? Drop your favorite one-liner in the comments below. Keep scripting, and stay secure. This works even if the PC is dead or offline
# Install RSAT (if not already) Add-WindowsCapability -Name "Rsat.BitLocker.Recovery.Tools~~~~0.0.1.0" -Online Get-BitLockerRecoveryInfo -ComputerName "PC-WS001" | Select-Object RecoveryPassword powershell get bitlocker recovery key remote computer
Some machines encrypt secondary drives (D:, E:). Use this to pull everything at once: