The following script will query the bitlocker recovery key for the C drive and return it into the scrolling event feed for NinjaRMM

$BLinfo = Get-Bitlockervolume
if($blinfo.ProtectionStatus -eq 'On' -and $blinfo.EncryptionPercentage -eq '100')
{write-output "'$env:computername - '$($blinfo.MountPoint)' is encrypted"write-output (Get-BitLockerVolume -MountPoint C).KeyProtector.RecoveryPassword}

Edit 2022-09-26: Mike Judd from MSPGeek pointed out an error in the script; now corrected