"Audit Windows machines on which the specified services are not installed and 'Running'" Policy not working

Shinde, Balaji 116 Reputation points
2021-11-30T13:43:25.93+00:00

Hi All,

I have duplicated a builtin policy i.e. "Audit Windows machines on which the specified services are not installed and 'Running'". I am trying audit my azure VMs for sysmon64 service. I have given the parameter as 'sysmon64'. But the policy is showing as non-compliant for all resources, irrespective of whether the service is present or not.

In comliance, it shows non-comliance reason as "No related resources match the effect details in the policy definition. (Error code: NoComplianceReport)".

I have tried changing the policy mode to All, tried with different service, different assignment, but the result is same.

Can someone help me here please?

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
1,014 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jesse Loudon 336 Reputation points
    2021-12-01T00:22:21.45+00:00

    Hi @Shinde, Balaji

    For the ServiceName parameter of this policy try passing in the parameter value of "Sysmon64". As perhaps case-sensitivity is an issue.

    Relating to Guest Configuration policies, there are some prerequisites that may be applicable to your use case. You can see these prerequisities here https://aka.ms/gcpol

    I checked this particular builtin policy and found this note in the description about about non-compliance:

    Machines are non-compliant if result of the Windows PowerShell command Get-Service do not include the service name with matching status as specified by the policy parameter.

    Hope this helps

    0 comments No comments

  2. Zaheer Gauhar 1 Reputation point
    2022-06-30T13:17:57.923+00:00

    Hi,
    I'm getting the same error for a different service. I have matched the case as well. Did you find a solution to your problem?

    Thanks in advance.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.