I wrote a custom compliance policy to check if Bitlocker exists and the device status shows as Compliant but the compliance report shows as Error in the compliance policy report.

Anonymous
2024-10-25T01:07:00+00:00

$blDrive = Get-BitLockerVolume | Where-Object {$_.MountPoint -eq "C:"}

$Percentage = [int64]$blDrive.EncryptionPercentage $ProtectionStatus = [int64]$blDrive.ProtectionStatus

$hash = @{

Percentage = $Percentage;ProtectionStatus = $ProtectionStatus} return $hash | ConvertTo-Json -Compressed -----------------------------------------------------------------------

{

"Rules":[{"SettingName": "Percentage","Operator": "IsEquals","DataType": "Int64","Operand": 100,"MoreInfoURL": "https://support.microsoft.com/en-au","RemediationStrings":[{"Language": "en_US","Title": "BitLocker Drive must be fully encrypted","Description": "BitLocker Drive must be fully encrypted"}]},{"SettingName": "ProtectionStatus","Operator": "IsEquals","DataType": "Int64","Operand": 1,"MoreInfoURL": "https://support.microsoft.com/en-au","RemediationStrings":[{"Language": "en_US","Title": "BitLocker Drive must be enabled","Description": "BitLocker Drive must be enabled"}]}]}

Windows for business | Windows Client for IT Pros | Performance | Windows desktop and shell experience

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-10-25T01:31:16+00:00

    Hello,

    Thank you for posting in Microsoft Community forum.

    Based on the description, I understand your question is related to use scripts to check the BitLocker encryption.

    Since there are no engineers dedicated to scripts in this forum. in order to be able to get a quick and effective handling of your issue, I recommend that you repost your question in the Q&A forum, where there will be a dedicated engineer to give you a professional and effective reply.

    Here is the link for Q&A forum.

    Questions - Microsoft Q&A

    Click the "Ask a Question" button in the upper right corner to post your question and select any tags related to your productions.

    Thank you for your understanding and support. If you have any question or concern, please feel free to let us know.

    Have a nice day. 

    Best Regards,

    Molly

    0 comments No comments