Just the 48-digit number. No extra text. Need more details (like the Key ID)? Invoke-Command -ComputerName "PC-WS001" -ScriptBlock Get-BitLockerVolume -MountPoint "C:" Method 2: Get Keys for ALL Drives (System + Data) Some machines encrypt secondary drives (D:, E:). Use this to pull everything at once:
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. 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. Just the 48-digit number
catch [PSCustomObject]@Computer=$pc; RecoveryKey=$null; Status="Failed: $ " Don't wait for a boot-loop emergency to figure this out
Invoke-Command -ComputerName "PC-WS001" -ScriptBlock $volumes = Get-BitLockerVolume foreach ($vol in $volumes) Where-Object $_.KeyProtectorType -eq 'RecoveryPassword').RecoveryPassword [PSCustomObject]@ ComputerName = $env:COMPUTERNAME MountPoint = $vol.MountPoint RecoveryKey = $recKey ProtectionStatus = $vol.ProtectionStatus