Custom compliance policy

Mountain Pond 1,411 Reputation points
2023-04-09T18:30:19.9766667+00:00

Hello, please help me figure it out.

The script searches for the program, if it finds it returns $true, and if it doesn't find it, it returns $false. I need to allow access only if the program is found i.e. true.

This is what the answer looks like: {"Installation status":true}

In the complient policy, it is logical to create a condition, if True -> then the program is found and allow access. If False -> means the program is not found and deny access.

However, as far as I understand, in politics, if the condition is not met, it means success. And vice versa, if the condition is met, then this means that the device does not complient. chrome_B0FEPmSlfI

chrome_Jyoj6hKvwj

This is very strange because it makes sense. If the condition matches. The script returns True and the policy specifies the Installation status condition. This means that the policy conditions are met and the policy is passed. For example, if I enable BitLocker check - I indicate that it is required and if it is enabled on the machine - then the policy has been passed and the condition has been met. However, it turns out not so, but quite the opposite.

Microsoft Intune Compliance
Microsoft Intune Compliance
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Compliance: Adhering to rules, standards, policies, and laws.
144 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,664 questions
0 comments No comments
{count} votes

Accepted answer
  1. Crystal-MSFT 45,656 Reputation points Microsoft Vendor
    2023-04-10T05:29:38.59+00:00

    @Denis Pasternak, Thanks for posting in in Q&A.

    For the Custom settings, if you want to consider if compliant when the installation status is true, then you need to change your JSON file you uploaded under "Upload and validate the JSON file with your custom compliance settings". Change the value to true in the following place: User's image

    Please try the above suggestion and hope it can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Mountain Pond 1,411 Reputation points
    2023-04-10T10:49:56.8866667+00:00

    Yes, it is, it should be True in the json file. In the production environment, many machines have become Complient and They actually have the application installed. And vice versa, not Complaent and I see that they do not have that application in the list of applications. Everything seems logical and correct. However, I was misled by the fact that in the test environment everything works the other way around. That's what I wanted to ask a question. If the device returns True as a result of the script execution and the condition is set to True in the rule, the json file is set to True. - Does that mean the device is Complient?