Creating reports for all devices with and without bitlocker.
Answers (2)
Using this as a Custom Inventory Field should create an entry in the Custom inventory section of any machine, with just the text displaying the status of the bitlocker installed on that device.
Running a custom inventory field has no effect on anything on the SMA so please do not be afraid to test the functionality.
Custom inventory rules are run locally, on agent systems for the stoped OS(es) .
The command you have there is fairly straight forward.
The best way to test a CIR you're unsure of is to do so on developmental instance of the appliance so that code you've not validated isn't automatically running on machines when they perform their inventory cycle.
As for the query you referenced, it's a pretty simple one. I want to say that I had tried to use that one but ran into some nuances which I can't fully recall as it was a while ago. I want to say the data it provided was sometimes blank, hard to search when more then one fixed disk volume is listed and possibly some nuances related to drives that windows 10 pre-encrypted but diddnt enable bitlocker on.
I ended up using this code which focuses specifically on the C: drive and gives me all specific values I'd want to query.
ShellCommandTextReturn(cmd.exe /c powershell.exe "Get-BitLockerVolume -MountPoint $env:SystemDrive| Select -Property MountPoint,EncryptionMethod,VolumeStatus,ProtectionStatus,KeyProtector|Format-List|Out-String|ForEach-Object {$_.Trim()}")
Systems that are encrypted and have bitlocker enabled will report;
ProtectionStatus : On