Customizing Endpoint Protection Recommendation in Azure Security Center

Published Oct 01 2020 08:18 AM 6,390 Views

Azure Security Center assesses your environment and enables you to understand the status of your resources, to help you improve the Security Posture. The heart of the Security Center lies in its recommendations. Security recommendations help you to reduce the attack surface across your workloads. One important recommendation that Security Center has is to identify if your computers have an endpoint protection solution installed.

Azure Security Center monitors the status of antimalware protection and reports this under the ‘Enable Endpoint protection’ security control when it identifies the Antimalware solution is not installed or unhealthy. Security Center highlights issues, such as detected threats and insufficient protection, which can make your virtual machines vulnerable to antimalware threats. This is a very important recommendation because malware cannot only be downloaded or installed by threat actors, but also inadvertently by legitimate users who are supposed to access your machines.

 

Azure Security Center covers a variety of Antimalware vendors today. You can find the list of supported versions in this article. However, in a scenario where you’re using an antimalware protection that is not in the Azure Security Center supported list but you still want to have visibility over the status of this antimalware using Security Center dashboard, how would you tackle this scenario? In this blog, I would like to walk you through a Github artifact that will help you monitor any antimalware you may be using even if it is not in the Security Center supported list.

 

The Github artifact will deploy a Guest Configuration policy to monitor antimalware in your machines. For context, Azure Guest Configuration Policy can audit settings inside a machine, both for machines running in Azure and Arc Connected Machines, the validation is performed by the Guest Configuration extension and client. Before we deploy this artifact, let’s understand the resources that’s making it all possible.

 

Expected contents of this Custom Guest Configuration artifact

The completed package is used by Guest Configuration to create the Azure Policy definitions. The package consists of:

-  Modules folder

  • AzureGuestConfigurationPolicy module
  • DscResources module
  • (Windows) DSC resource modules required by the MOF

The DSC module in the artifact, is checking CIM Instance (Get-CimInstance) in the SecurityCenter namespace to check for any antivirus product installed in the Windows VM and the query returns the list of antimalware installed in the machine (an example is as shown in Image 1).

Image 1: Get-CimInstance outputImage 1: Get-CimInstance output

In my example here, the VM is running Windows Defender as well as Avast Antivirus. Azure Security Center can discover Windows Defender however, Avast Antivirus discovery is not supported.

 

The DSC is then trying to identify if there is a process running that executable on the VM, which evaluates the Antivirus is not just installed but it’s running and healthy in a given VM.

The DSC is using Get-Process that will  find the process running in the machine (an example is as shown in Image 2). If there’s no instance of a process running the Antivirus executable found, the validation will stop and returns a status of Stopped providing you a clear description.

Picture2.pngImage 2: Get-Process outputImage 2: Get-Process output

In summary, If the antimalware is not found in the CIMInstance list, then the DSC returns Absent. If it is found, but doesn’t identify the process running, it will return:

Ensure = “Present”

Status = “Stopped”

 

If the process is found, then:

Ensure = “Present”

Status = “Running”

For an overview of DSC concepts and terminology, see PowerShell DSC Overview.

 

Under AzureGuestConfigurationPolicy folder, you’ll find a module (AzureGuestPolicyHelper.psm1) that will help you create policy package, upload it directly to your Azure subscription and will configure everything for you. Let’s take a step back and review the resources in here.

When auditing Windows, Guest Configuration uses a Desired State Configuration (DSC) resource module to create the configuration file. The DSC configuration defines the condition that the machine should be in. If the evaluation of the configuration fails, the policy effect auditIfNotExists is triggered and the machine is considered non-compliant.

In our example, under the Configuration folder you’ll notice a bogus configuration which is needed for Azure Guest Configuration policy during execution. So here, the configuration that will be used for the policy. In our scenario, we want to monitor Antivirus making sure the antivirus is installed and the agent is running. Find the sample below for reference,  

 

Configuration MonitorAntivirus

{

    Import-DscResource -ModuleName EndPointProtectionDSC

    Node MonitorAntivirus

    {

        EPAntivirusStatus AV

        {

            AntivirusName = "Windows Defender"

            Status        = "Running"

            Ensure        = "Present"

        }

    }

}

cd $env:Temp

MonitorAntivirus

NOTE: Though I’m specifying Windows Defender as the AntivirusName in the configuration file, it could really be anything. You could monitor for any Antivirus software you might be running, during the compile time, which takes me to my next section - Parameters file.

 

The script is using parameters file (sample below for reference) which basically tells the Azure Guest Configuration policy to monitor for that specific Antivirus software that you specify during the assignment.

Remember, you can use wildcard entry too. For eg., if you want to monitor for ‘Avast Antivirus’ and you’re not sure what is the complete name of the Antivirus Windows is referring it as, you can simply type in as Avast*

 

@(

    @{

        Name                 = 'AntivirusName'

        DisplayName          = 'Antivirus Name'

        Description          = "Name of the Antivirus Software to monitor."

        ResourceType         = "EPAntivirusStatus"

        ResourceId           = 'AV'

        ResourcePropertyName = "AntivirusName"

        DefaultValue         = 'Windows Defender'

        #AllowedValues        = @('Avast','Windows Defender','CrowdStrike','Sentinel One')

    }

)

This entire configuration is compiled into a .MOF file which will eventually be stored in the Azure blob storage account that you specify during the execution.

Make sure to read about how Azure Policy’s Guest Configuration works that will help you understand this script in detail.

 

Execution of this Custom Guest Configuration policy:

 

Pre-requisites:

  1. Modules that are needed by the configuration must be in available in $Env:PSModulePath. So, make sure to download the entire artifact from the Github repository and save the unzipped folder to your local machine under ‘C:\Program Files\WindowsPowerShell\Modules’ before the execution.
  2. To audit settings inside a machine, the Guest Configuration extension and a managed identity is required to audit Azure virtual machines. To deploy the extension at scale, make sure to choose appropriate scope and assign the policy initiative ‘Deploy prerequisites to enable Guest Configuration policies on virtual machines’ under Azure Policies as shown in the image (Image 3) below.

Image 3: Deploy Prerequisites to enable Guest Configuration Policies in VMsImage 3: Deploy Prerequisites to enable Guest Configuration Policies in VMs

Refer to this article, to understand Scope in Azure Policy.

 

Image 4: Policies under Guest Configuration Policy InitiativeImage 4: Policies under Guest Configuration Policy Initiative

To understand the Effect Type of the policies, please refer to this article

 

Once you’ve assigned the Guest Configuration policy to a specific Scope, you can monitor the Compliance of the policy from the ‘Compliance’ section under ‘Azure Policy’. As shown in the below Image 5.

Image 5: Guest Configuration Policy Initiative showing ComplianceImage 5: Guest Configuration Policy Initiative showing Compliance

Once you have taken care of the pre-requisites, proceed with the execution of the policy.

 

Execution:

  1. Open the PowerShell as an administrator in your local machine and run the command ‘New-EPDSCAzureGuestConfigurationPolicyPackage’ which will create policy package for you in your Azure Subscription.
  2. You’ll first be prompted to enter a Resource Group Name, Resource Group Location, Storage Container Name, Storage account name and Storage SKU name
  3. You’ll then be prompted to login to your Azure Subscription
    Refer to this article to learn about Storing Guest Configuration artifacts.
  4. Once connected to your subscription, the script will compile the DSC configuration to a MOF file and will publish the Configuration package to the storage account (you defined in Step 2) in the blob storage (as shown in the below image 6)
  5. This eventually generates a Guest Configuration policy and publishes the Initiative under Definitions of the Azure Policies as a Guest configuration policy.
  6. Under the Policies tab, you’ll notice all the individual policy definitions in the initiative that contribute to this control, as shown in image 7 and Image 8.

Policy ExecutionPolicy Execution

 

Image 6: Configuration file that’s uploaded to Storage blob ContainerImage 6: Configuration file that’s uploaded to Storage blob Container

Image 7: Initiative to monitor AntivirusImage 7: Initiative to monitor AntivirusImage 8: Policies under the InitiativeImage 8: Policies under the Initiative

Now it’s time to assign this Initiative to the scope you desire to target. The term scope refers to all the resources, resource groups, subscriptions, or management groups that the definition is assigned to. 

Please refer this article, to learn more about the assignment and for steps to assign it via PowerShell and Azure CLI. 

 

While you’re assigning this Initiative to a Scope, you could modify the Assignment name if required as shown in the gif below.

Policy AssignmentPolicy Assignment

 

Once you’ve assigned the custom policy, review the Compliance state of the policies by navigating to ‘Compliance’ under Azure Policy and selecting the Initiative. The Resource compliance tab provides a granular view of each resource that's evaluated by a member policy of the currently viewed control

 

Checking ComplianceChecking Compliance

 

In my example, I’m monitoring to gather details of VMs which do not have installed and not running. I’ve two resources (epptest (VM without Avast Installed) and vmclient (VM with Avast Installed)) in the selected scope. The script is identifying the VM that do not have Avast installed and raising the non-compliance of the resource with the help of ‘Audit policy’.

 

Assign the Custom Initiative to Azure Security Center

You can add the custom Initiative to Security Center to receive recommendations if your environment doesn’t follow the policy you created. As we learnt above, Security Center automatically runs continuous scans to analyze the security state of your Azure resources. When Security Center identifies potential security vulnerabilities, it creates recommendations that guide you through the process of configuring the needed security controls. Security Center updates the Endpoint Protection issue recommendations within 8 hours.

 

To assign this Custom Initiative, navigate to Security Policy under Security center and choose the desired subscription or Management Group. Click on ‘Add a Custom Initiative’ under Your Custom Initiatives that should take you to a screen as below (Image 9), find the Initiative created above and click on ‘add’

Image 9: Add Custom InitiativeImage 9: Add Custom Initiative

Your new Initiative takes effect and you can see the impact in two ways:

  • From the Security Center sidebar, under Policy & Compliance, select Regulatory compliance. The compliance dashboard opens to show your new custom initiative alongside the built-in initiatives.
  • You'll begin to receive recommendations if your environment doesn't follow the policy you've defined.

To see the resulting recommendations for your policy, click Recommendations from the sidebar to open the recommendations page. The recommendations will appear with a "Custom recommendations" label as shown in Image 10

Image 10: Custom RecommendationsImage 10: Custom Recommendations

NOTE: Make sure to disable the Endpoint protection policy (in the built-in ASC initiative) that generates missing Endpoint protection recommendation inorder to prevent it appearing again and to avoid it to be counted to the overall Secure score.

The disable policy changes can take up to 12 hours to take effect.

Refer to this article to disable a recommendation to appear by disabling the specific policy that generates the recommendations.

 

Enhance custom Recommendations

You can further enhance your custom recommendations similar to the built-in recommendations. The built-in recommendations supplied with Azure Security Center includes details such as severity levels and remediation instructions. If you want to add this type of information to your custom recommendation, follow this article

 

This GitHub Artifact as well as many other can be found here:

Direct Link to GitHub sample

Azure Security Center GitHub Repo

 

Additional Resource:

Shoutout to Microsoft365DSC which makes automation easy. Check it out on how it can help your business with this 2 minutes promotional video or reach out to @NikCharlebois if you're interested to learn more about it. 

 

Are you an organization using Endpoint protection outside of what ASC supports? Don’t worry anymore, go ahead and deploy this policy to witness the magic.

 

Reviewer

Special Thanks to @Yuri Diogenes, Principal Program Manager, for envisioning this and for all the inputs to this article. 

1 Comment
Senior Member

I was very happy to see this however pity we cant use for server OS as SecurityCenter2 is no no longer an option. 

%3CLINGO-SUB%20id%3D%22lingo-sub-1733217%22%20slang%3D%22en-US%22%3ECustomizing%20Endpoint%20Protection%20Recommendation%20in%20Azure%20Security%20Center%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1733217%22%20slang%3D%22en-US%22%3E%3CP%3EAzure%20Security%20Center%20assesses%20your%20environment%20and%20enables%20you%20to%20understand%20the%20status%20of%20your%20resources%2C%20to%20help%20you%20improve%20the%20Security%20Posture.%20The%20heart%20of%20the%20Security%20Center%20lies%20in%20its%20recommendations.%20Security%20recommendations%20help%20you%20to%20reduce%20the%20attack%20surface%20across%20your%20workloads.%20One%20important%20recommendation%20that%20Security%20Center%20has%20is%20to%20identify%20if%20your%20computers%20have%20an%20endpoint%20protection%20solution%20installed.%3C%2FP%3E%0A%3CP%3EAzure%20Security%20Center%20monitors%20the%20status%20of%20antimalware%20protection%20and%20reports%20this%20under%20the%20%E2%80%98%3CEM%3EEnable%20Endpoint%20protection%3C%2FEM%3E%E2%80%99%20security%20control%20when%20it%20identifies%20the%20Antimalware%20solution%20is%20not%20installed%20or%20unhealthy.%20Security%20Center%20highlights%20issues%2C%20such%20as%20detected%20threats%20and%20insufficient%20protection%2C%20which%20can%20make%20your%20virtual%20machines%20vulnerable%20to%20antimalware%20threats.%20This%20is%20a%20very%20important%20recommendation%20because%20malware%20cannot%20only%20be%20downloaded%20or%20installed%20by%20threat%20actors%2C%20but%20also%20inadvertently%20by%20legitimate%20users%20who%20are%20supposed%20to%20access%20your%20machines.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAzure%20Security%20Center%20covers%20a%20variety%20of%20Antimalware%20vendors%20today.%20You%20can%20find%20the%20list%20of%20supported%20versions%20in%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsecurity-center%2Fsecurity-center-services%3Ftabs%3Dfeatures-windows%23endpoint-supported%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Earticle%3C%2FA%3E.%20However%2C%20in%20a%20scenario%20where%20you%E2%80%99re%20using%20an%20antimalware%20protection%20that%20is%20not%20in%20the%20Azure%20Security%20Center%20supported%20list%20but%20you%20still%20want%20to%20have%20visibility%20over%20the%20status%20of%20this%20antimalware%20using%20Security%20Center%20dashboard%2C%20how%20would%20you%20tackle%20this%20scenario%3F%20In%20this%20blog%2C%20I%20would%20like%20to%20walk%20you%20through%20a%20Github%20artifact%20that%20will%20help%20you%20monitor%20any%20antimalware%20you%20may%20be%20using%20even%20if%20it%20is%20not%20in%20the%20Security%20Center%20supported%20list.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Security-Center%2Ftree%2Fmaster%2FRemediation%2520scripts%2FCustomize%2520Endpoint%2520Protection%2520Recommendation%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGithub%20artifact%3C%2FA%3E%20will%20deploy%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fconcepts%2Fguest-configuration%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGuest%20Configuration%20policy%3C%2FA%3E%20to%20monitor%20antimalware%20in%20your%20machines.%20For%20context%2C%20Azure%20Guest%20Configuration%20Policy%20can%20audit%20settings%20inside%20a%20machine%2C%20both%20for%20machines%20running%20in%20Azure%20and%20Arc%20Connected%20Machines%2C%20the%20validation%20is%20performed%20by%20the%20Guest%20Configuration%20extension%20and%20client.%20Before%20we%20deploy%20this%20artifact%2C%20let%E2%80%99s%20understand%20the%20resources%20that%E2%80%99s%20making%20it%20all%20possible.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EExpected%20contents%20of%20this%20Custom%20Guest%20Configuration%20artifact%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20completed%20package%20is%20used%20by%20Guest%20Configuration%20to%20create%20the%20Azure%20Policy%20definitions%3CSTRONG%3E.%20%3C%2FSTRONG%3EThe%20package%20consists%20of%3A%3C%2FP%3E%0A%3CP%3E-%26nbsp%3B%20Modules%20folder%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAzureGuestConfigurationPolicy%20module%3C%2FLI%3E%0A%3CLI%3EDscResources%20module%3C%2FLI%3E%0A%3CLI%3E(Windows)%20DSC%20resource%20modules%20required%20by%20the%20MOF%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThe%20%3CSTRONG%3EDSC%20module%3C%2FSTRONG%3E%20in%20the%20artifact%2C%20is%20checking%20CIM%20Instance%20(Get-CimInstance)%20in%20the%20SecurityCenter%20namespace%20to%20check%20for%20any%20antivirus%20product%20installed%20in%20the%20Windows%20VM%20and%20the%20query%20returns%20the%20list%20of%20antimalware%20installed%20in%20the%20machine%20(an%20example%20is%20as%20shown%20in%20%3CEM%3EImage%201%3C%2FEM%3E).%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture1.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223252iAF5BE0270A801AC6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Picture1.png%22%20alt%3D%22Image%201%3A%20Get-CimInstance%20output%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%201%3A%20Get-CimInstance%20output%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIn%20my%20example%20here%2C%20the%20VM%20is%20running%20%3CEM%3EWindows%20Defender%3C%2FEM%3E%20as%20well%20as%20%3CEM%3EAvast%20Antivirus%3C%2FEM%3E.%20Azure%20Security%20Center%20can%20discover%20Windows%20Defender%20however%2C%20Avast%20Antivirus%20discovery%20is%20not%20supported.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20DSC%20is%20then%20trying%20to%20identify%20if%20there%20is%20a%20process%20running%20that%20executable%20on%20the%20VM%2C%20which%20evaluates%20the%20Antivirus%20is%20not%20just%20installed%20but%20it%E2%80%99s%20running%20and%20healthy%20in%20a%20given%20VM.%3C%2FP%3E%0A%3CP%3EThe%20DSC%20is%20using%20%3CEM%3EGet-Process%20%3C%2FEM%3Ethat%20will%20%26nbsp%3Bfind%20the%20process%20running%20in%20the%20machine%20(an%20example%20is%20as%20shown%20in%20%3CEM%3EImage%202%3C%2FEM%3E).%20If%20there%E2%80%99s%20no%20instance%20of%20a%20process%20running%20the%20Antivirus%20executable%20found%2C%20the%20validation%20will%20stop%20and%20returns%20a%20status%20of%20%3CSTRONG%3EStopped%3C%2FSTRONG%3E%20providing%20you%20a%20clear%20description.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture2.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223253i7A64678F4A408CEF%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Picture2.png%22%20alt%3D%22Picture2.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture3.png%22%20style%3D%22width%3A%20525px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223254iC1C01D697E182FED%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Picture3.png%22%20alt%3D%22Image%202%3A%20Get-Process%20output%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%202%3A%20Get-Process%20output%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIn%20summary%2C%20If%20the%20antimalware%20is%20not%20found%20in%20the%20CIMInstance%20list%2C%20then%20the%20DSC%20returns%20Absent.%20If%20it%20is%20found%2C%20but%20doesn%E2%80%99t%20identify%20the%20process%20running%2C%20it%20will%20return%3A%3C%2FP%3E%0A%3CP%3EEnsure%20%3D%20%E2%80%9CPresent%E2%80%9D%3C%2FP%3E%0A%3CP%3EStatus%20%3D%20%E2%80%9CStopped%E2%80%9D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20the%20process%20is%20found%2C%20then%3A%3C%2FP%3E%0A%3CP%3EEnsure%20%3D%20%E2%80%9CPresent%E2%80%9D%3C%2FP%3E%0A%3CP%3EStatus%20%3D%20%E2%80%9CRunning%E2%80%9D%3C%2FP%3E%0A%3CP%3EFor%20an%20overview%20of%20DSC%20concepts%20and%20terminology%2C%20see%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fscripting%2Fdsc%2Foverview%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EPowerShell%20DSC%20Overview%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUnder%20%3CEM%3EAzureGuestConfigurationPolicy%3C%2FEM%3E%20folder%2C%20you%E2%80%99ll%20find%20a%20module%20(AzureGuestPolicyHelper.psm1)%20that%20will%20help%20you%20create%20%3CEM%3Epolicy%20package%3C%2FEM%3E%2C%20upload%20it%20directly%20to%20your%20Azure%20subscription%20and%20will%20configure%20everything%20for%20you.%20Let%E2%80%99s%20take%20a%20step%20back%20and%20review%20the%20resources%20in%20here.%3C%2FP%3E%0A%3CP%3EWhen%20auditing%20Windows%2C%20Guest%20Configuration%20uses%20a%20Desired%20State%20Configuration%20(DSC)%20resource%20module%20to%20create%20the%20configuration%20file.%20The%20DSC%20configuration%20defines%20the%20condition%20that%20the%20machine%20should%20be%20in.%20If%20the%20evaluation%20of%20the%20configuration%20fails%2C%20the%20policy%20effect%20auditIfNotExists%20is%20triggered%20and%20the%20machine%20is%20considered%20non-compliant.%3C%2FP%3E%0A%3CP%3EIn%20our%20example%2C%20under%20the%20%3CEM%3EConfiguration%20folder%3C%2FEM%3E%20you%E2%80%99ll%20notice%20a%20bogus%20configuration%20which%20is%20needed%20for%20Azure%20Guest%20Configuration%20policy%20during%20execution.%20So%20here%2C%20the%20configuration%20that%20will%20be%20used%20for%20the%20policy.%20In%20our%20scenario%2C%20we%20want%20to%20monitor%20Antivirus%20making%20sure%20the%20antivirus%20is%20installed%20and%20the%20agent%20is%20running.%20Find%20the%20sample%20below%20for%20reference%2C%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EConfiguration%20MonitorAntivirus%3C%2FP%3E%0A%3CP%3E%7B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Import-DscResource%20-ModuleName%20EndPointProtectionDSC%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Node%20MonitorAntivirus%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20EPAntivirusStatus%20AV%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20AntivirusName%20%3D%20%22Windows%20Defender%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Status%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20%22Running%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Ensure%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20%22Present%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%0A%3CP%3E%7D%3C%2FP%3E%0A%3CP%3Ecd%20%24env%3ATemp%3C%2FP%3E%0A%3CP%3EMonitorAntivirus%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ENOTE%3A%3C%2FSTRONG%3E%20Though%20I%E2%80%99m%20specifying%20%3CEM%3EWindows%20Defender%3C%2FEM%3E%20as%20the%20%3CEM%3EAntivirusName%3C%2FEM%3E%20in%20the%20configuration%20file%2C%20it%20could%20really%20be%20anything.%20You%20could%20monitor%20for%20any%20Antivirus%20software%20you%20might%20be%20running%2C%20during%20the%20compile%20time%2C%20which%20takes%20me%20to%20my%20next%20section%20-%20Parameters%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20script%20is%20using%20parameters%20file%20(sample%20below%20for%20reference)%20which%20basically%20tells%20the%20Azure%20Guest%20Configuration%20policy%20to%20monitor%20for%20that%20specific%20Antivirus%20software%20that%20you%20specify%20during%20the%20assignment.%3C%2FP%3E%0A%3CP%3ERemember%2C%20you%20can%20use%20wildcard%20entry%20too.%20For%20eg.%2C%20if%20you%20want%20to%20monitor%20for%20%E2%80%98%3CEM%3EAvast%20Antivirus%E2%80%99%3C%2FEM%3E%20and%20you%E2%80%99re%20not%20sure%20what%20is%20the%20complete%20name%20of%20the%20Antivirus%20Windows%20is%20referring%20it%20as%2C%20you%20can%20simply%20type%20in%20as%20Avast*%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%40(%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%40%7B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Name%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20'AntivirusName'%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20DisplayName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20'Antivirus%20Name'%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Description%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20%22Name%20of%20the%20Antivirus%20Software%20to%20monitor.%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ResourceType%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20%22EPAntivirusStatus%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ResourceId%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20'AV'%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ResourcePropertyName%20%3D%20%22AntivirusName%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20DefaultValue%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20'Windows%20Defender'%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23AllowedValues%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20%40('Avast'%2C'Windows%20Defender'%2C'CrowdStrike'%2C'Sentinel%20One')%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%0A%3CP%3E)%3C%2FP%3E%0A%3CP%3EThis%20entire%20configuration%20is%20compiled%20into%20a%20.MOF%20file%20which%20will%20eventually%20be%20stored%20in%20the%20Azure%20blob%20storage%20account%20that%20you%20specify%20during%20the%20execution.%3C%2FP%3E%0A%3CP%3EMake%20sure%20to%20read%20about%20how%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fconcepts%2Fguest-configuration%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Policy%E2%80%99s%20Guest%20Configuration%3C%2FA%3E%20works%20that%20will%20help%20you%20understand%20this%20script%20in%20detail.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EExecution%20of%20this%20Custom%20Guest%20Configuration%20policy%3A%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPre-requisites%3A%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CSPAN%3EModules%20that%20are%20needed%20by%20the%20configuration%20must%20be%20in%20available%20in%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3E%24Env%3APSModulePath%3C%2FCODE%3E%3CSPAN%3E.%20So%2C%20m%3C%2FSPAN%3Eake%20sure%20to%20download%20the%20entire%20artifact%20from%20the%20Github%20repository%20and%20save%20the%20unzipped%20folder%20to%20your%20local%20machine%20under%20%3CEM%3E%E2%80%98C%3A%5CProgram%20Files%5CWindowsPowerShell%5CModules%E2%80%99%3C%2FEM%3E%20before%20the%20execution.%3C%2FLI%3E%0A%3CLI%3ETo%20audit%20settings%20inside%20a%20machine%2C%20the%20Guest%20Configuration%20extension%20and%20a%20managed%20identity%20is%20required%20to%20audit%20Azure%20virtual%20machines.%20To%20deploy%20the%20extension%20at%20scale%2C%20make%20sure%20to%20choose%20appropriate%20%3CEM%3Escope%3C%2FEM%3E%20and%20assign%20the%20policy%20initiative%20%E2%80%98%3CEM%3EDeploy%20prerequisites%20to%20enable%20Guest%20Configuration%20policies%20on%20virtual%20machines%E2%80%99%20%3C%2FEM%3Eunder%20Azure%20Policies%20as%20shown%20in%20the%20image%20(%3CEM%3EImage%203%3C%2FEM%3E)%20below.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture4.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223256i167E86513B271B27%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Picture4.png%22%20alt%3D%22Image%203%3A%20Deploy%20Prerequisites%20to%20enable%20Guest%20Configuration%20Policies%20in%20VMs%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%203%3A%20Deploy%20Prerequisites%20to%20enable%20Guest%20Configuration%20Policies%20in%20VMs%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ERefer%20to%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fconcepts%2Fscope%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Earticle%3C%2FA%3E%2C%20to%20understand%20%3CEM%3EScope%3C%2FEM%3E%20in%20%3CEM%3EAzure%20Policy%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture6.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223257i05BC8FA71FA595EC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Picture6.png%22%20alt%3D%22Image%204%3A%20Policies%20under%20Guest%20Configuration%20Policy%20Initiative%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%204%3A%20Policies%20under%20Guest%20Configuration%20Policy%20Initiative%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ETo%20understand%20the%20%3CEM%3EEffect%20Type%3C%2FEM%3E%20of%20the%20policies%2C%20please%20refer%20to%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fconcepts%2Feffects%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Earticle%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EOnce%20you%E2%80%99ve%20assigned%20the%20Guest%20Configuration%20policy%20to%20a%20specific%20%3CEM%3EScope%3C%2FEM%3E%2C%20you%20can%20monitor%20the%20Compliance%20of%20the%20policy%20from%20the%20%E2%80%98%3CEM%3ECompliance%E2%80%99%3C%2FEM%3E%20section%20under%20%E2%80%98%3CEM%3EAzure%20Policy%E2%80%99%3C%2FEM%3E.%20As%20shown%20in%20the%20below%20%3CEM%3EImage%205.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture7.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223258i7A05C2F3B3091E50%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Picture7.png%22%20alt%3D%22Image%205%3A%20Guest%20Configuration%20Policy%20Initiative%20showing%20Compliance%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%205%3A%20Guest%20Configuration%20Policy%20Initiative%20showing%20Compliance%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOnce%20you%20have%20taken%20care%20of%20the%20pre-requisites%2C%20proceed%20with%20the%20execution%20of%20the%20policy.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EExecution%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EOpen%20the%20PowerShell%20as%20an%20administrator%20in%20your%20local%20machine%20and%20run%20the%20command%20%3CSTRONG%3E%E2%80%98New-EPDSCAzureGuestConfigurationPolicyPackage%E2%80%99%3C%2FSTRONG%3E%20which%20will%20create%20policy%20package%20for%20you%20in%20your%20Azure%20Subscription.%3C%2FLI%3E%0A%3CLI%3EYou%E2%80%99ll%20first%20be%20prompted%20to%20enter%20a%20Resource%20Group%20Name%2C%20Resource%20Group%20Location%2C%20Storage%20Container%20Name%2C%20Storage%20account%20name%20and%20Storage%20SKU%20name%3C%2FLI%3E%0A%3CLI%3EYou%E2%80%99ll%20then%20be%20prompted%20to%20login%20to%20your%20Azure%20Subscription%3CBR%20%2F%3ERefer%20to%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fhow-to%2Fguest-configuration-create%23storing-guest-configuration-artifacts%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Earticle%3C%2FA%3E%20to%20learn%20about%20Storing%20Guest%20Configuration%20artifacts.%3C%2FLI%3E%0A%3CLI%3EOnce%20connected%20to%20your%20subscription%2C%20the%20script%20will%20compile%20the%20DSC%20configuration%20to%20a%20MOF%20file%20and%20will%20publish%20the%20Configuration%20package%20to%20the%20storage%20account%20(you%20defined%20in%20Step%202)%20in%20the%20blob%20storage%20(as%20shown%20in%20the%20below%20image%206)%3C%2FLI%3E%0A%3CLI%3EThis%20eventually%20generates%20a%20Guest%20Configuration%20policy%20and%20publishes%20the%20Initiative%20under%20Definitions%20of%20the%20Azure%20Policies%20as%20a%20Guest%20configuration%20policy.%3C%2FLI%3E%0A%3CLI%3EUnder%20the%20%3CSTRONG%3EPolicies%3C%2FSTRONG%3E%20tab%2C%20you%E2%80%99ll%20notice%20all%20the%20individual%20policy%20definitions%20in%20the%20initiative%20that%20contribute%20to%20this%20%3CSTRONG%3Econtrol%3C%2FSTRONG%3E%2C%20as%20shown%20in%20image%207%20and%20Image%208.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PolicyExecution.gif%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223325i95F950A6A93A725C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22PolicyExecution.gif%22%20alt%3D%22Policy%20Execution%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EPolicy%20Execution%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Image3.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223363i439DDC61D4E3CB1F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Image3.png%22%20alt%3D%22Image%206%3A%20Configuration%20file%20that%E2%80%99s%20uploaded%20to%20Storage%20blob%20Container%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%206%3A%20Configuration%20file%20that%E2%80%99s%20uploaded%20to%20Storage%20blob%20Container%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Image%204.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223364i6DD8225B2E4B20B6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Image%204.png%22%20alt%3D%22Image%207%3A%20Initiative%20to%20monitor%20Antivirus%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%207%3A%20Initiative%20to%20monitor%20Antivirus%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image5.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223365i617CB06F2F3D4754%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image5.png%22%20alt%3D%22Image%208%3A%20Policies%20under%20the%20Initiative%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%208%3A%20Policies%20under%20the%20Initiative%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENow%20it%E2%80%99s%20time%20to%20assign%20this%20Initiative%20to%20the%20scope%20you%20desire%20to%20target.%20The%20term%26nbsp%3B%3CEM%3Escope%3C%2FEM%3E%26nbsp%3Brefers%20to%20all%20the%20resources%2C%20resource%20groups%2C%20subscriptions%2C%20or%20management%20groups%20that%20the%20definition%20is%20assigned%20to.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20refer%20this%20article%2C%20to%20learn%20more%20about%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Foverview%23assignments%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eassignment%3C%2FA%3E%20and%20for%20steps%20to%20assign%20it%20via%20PowerShell%20and%20Azure%20CLI.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhile%20you%E2%80%99re%20assigning%20this%20Initiative%20to%20a%20Scope%2C%20you%20could%20modify%20the%20Assignment%20name%20if%20required%20as%20shown%20in%20the%20gif%20below.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PolicyAssignment.gif%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223376i28F337DD53061806%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22PolicyAssignment.gif%22%20alt%3D%22Policy%20Assignment%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EPolicy%20Assignment%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20you%E2%80%99ve%20assigned%20the%20custom%20policy%2C%20review%20the%20Compliance%20state%20of%20the%20policies%20by%20navigating%20to%20%E2%80%98%3CEM%3ECompliance%E2%80%99%3C%2FEM%3E%20under%20%3CEM%3EAzure%20Policy%3C%2FEM%3E%20and%20selecting%20the%20Initiative%3CEM%3E.%20%3C%2FEM%3EThe%26nbsp%3B%3CSTRONG%3EResource%20compliance%3C%2FSTRONG%3E%26nbsp%3Btab%20provides%20a%20granular%20view%20of%20each%20resource%20that's%20evaluated%20by%20a%20member%20policy%20of%20the%20currently%20viewed%26nbsp%3B%3CSTRONG%3Econtrol%3C%2FSTRONG%3E.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ComplianceCheck.gif%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223370i7998C3CB415725A6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22ComplianceCheck.gif%22%20alt%3D%22Checking%20Compliance%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EChecking%20Compliance%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20my%20example%2C%20I%E2%80%99m%20monitoring%20to%20gather%20details%20of%20VMs%20which%20do%20not%20have%20installed%20and%20not%20running.%20I%E2%80%99ve%20two%20resources%20(epptest%20(VM%20without%20Avast%20Installed)%20and%20vmclient%20(VM%20with%20Avast%20Installed))%20in%20the%20selected%20scope.%20The%20script%20is%20identifying%20the%20VM%20that%20do%20not%20have%20Avast%20installed%20and%20raising%20the%20non-compliance%20of%20the%20resource%20with%20the%20help%20of%20%3CEM%3E%E2%80%98Audit%20policy%E2%80%99%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAssign%20the%20Custom%20Initiative%20to%20Azure%20Security%20Center%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EYou%20can%20add%20the%20%3CEM%3Ecustom%3C%2FEM%3E%20Initiative%20to%20Security%20Center%20to%20receive%20recommendations%20if%20your%20environment%20doesn%E2%80%99t%20follow%20the%20policy%20you%20created.%20As%20we%20learnt%20above%2C%20Security%20Center%20automatically%20runs%20continuous%20scans%20to%20analyze%20the%20security%20state%20of%20your%20Azure%20resources.%20When%20Security%20Center%20identifies%20potential%20security%20vulnerabilities%2C%20it%20creates%20recommendations%20that%20guide%20you%20through%20the%20process%20of%20configuring%20the%20needed%20security%20controls.%20Security%20Center%20updates%20the%20Endpoint%20Protection%20issue%20recommendations%20within%208%20hours.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20assign%20this%20Custom%20Initiative%2C%20navigate%20to%20%3CEM%3ESecurity%20Policy%3C%2FEM%3E%20under%20%3CEM%3ESecurity%20center%20%3C%2FEM%3Eand%20choose%20the%20desired%20subscription%20or%20Management%20Group.%20Click%20on%20%E2%80%98Add%20a%20Custom%20Initiative%E2%80%99%20under%20Your%20Custom%20Initiatives%20that%20should%20take%20you%20to%20a%20screen%20as%20below%20(%3CEM%3EImage%209%3C%2FEM%3E)%2C%20find%20the%20Initiative%20created%20above%20and%20click%20on%20%E2%80%98%3CEM%3Eadd%E2%80%99%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture8.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223329iCAC2AD452BAEBB80%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Picture8.png%22%20alt%3D%22Image%209%3A%20Add%20Custom%20Initiative%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%209%3A%20Add%20Custom%20Initiative%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EYour%20new%20Initiative%20takes%20effect%20and%20you%20can%20see%20the%20impact%20in%20%3CEM%3Etwo%3C%2FEM%3E%20ways%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFrom%20the%20Security%20Center%20sidebar%2C%20under%20Policy%20%26amp%3B%20Compliance%2C%20select%26nbsp%3B%3CSTRONG%3ERegulatory%20compliance%3C%2FSTRONG%3E.%20The%20compliance%20dashboard%20opens%20to%20show%20your%20new%20custom%20initiative%20alongside%20the%20built-in%20initiatives.%3C%2FLI%3E%0A%3CLI%3EYou'll%20begin%20to%20receive%20recommendations%20if%20your%20environment%20doesn't%20follow%20the%20policy%20you've%20defined.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ETo%20see%20the%20resulting%20recommendations%20for%20your%20policy%2C%20click%26nbsp%3B%3CSTRONG%3ERecommendations%3C%2FSTRONG%3E%26nbsp%3Bfrom%20the%20sidebar%20to%20open%20the%20recommendations%20page.%20The%20recommendations%20will%20appear%20with%20a%20%22Custom%20recommendations%22%20label%20as%20shown%20in%20%3CEM%3EImage%2010%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture9.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223333i6CC0B6FA8AAAA71A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Picture9.png%22%20alt%3D%22Image%2010%3A%20Custom%20Recommendations%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImage%2010%3A%20Custom%20Recommendations%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ENOTE%3C%2FSTRONG%3E%3A%20Make%20sure%20to%20disable%20the%20Endpoint%20protection%20policy%20(in%20the%20built-in%20ASC%20initiative)%20that%20generates%20missing%20Endpoint%20protection%20recommendation%20inorder%20to%20prevent%20it%20appearing%20again%20and%20to%20avoid%20it%20to%20be%20counted%20to%20the%20overall%20Secure%20score.%3C%2FP%3E%0A%3CP%3EThe%20disable%20policy%20changes%20can%20take%20up%20to%2012%20hours%20to%20take%20effect.%3C%2FP%3E%0A%3CP%3ERefer%20to%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsecurity-center%2Ftutorial-security-policy%23disable-security-policies-and-disable-recommendations%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Earticle%3C%2FA%3E%20to%20disable%20a%20recommendation%20to%20appear%20by%20disabling%20the%20specific%20policy%20that%20generates%20the%20recommendations.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EEnhance%20custom%20Recommendations%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EYou%20can%20further%20enhance%20your%20custom%20recommendations%20similar%20to%20the%20built-in%20recommendations.%20The%20built-in%20recommendations%20supplied%20with%20Azure%20Security%20Center%20includes%20details%20such%20as%20severity%20levels%20and%20remediation%20instructions.%20If%20you%20want%20to%20add%20this%20type%20of%20information%20to%20your%20custom%20recommendation%2C%20follow%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsecurity-center%2Fcustom-security-policies%23enhance-your-custom-recommendations-with-detailed-information%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Earticle%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20GitHub%20Artifact%20as%20well%20as%20many%20other%20can%20be%20found%20here%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Security-Center%2Ftree%2Fmaster%2FRemediation%2520scripts%2FCustomize%2520Endpoint%2520Protection%2520Recommendation%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EDirect%20Link%20to%20GitHub%20sample%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Security-Center%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Security%20Center%20GitHub%20Repo%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EAdditional%20Resource%3A%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EShoutout%20to%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2FM365DSCpromo%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft365DSC%3C%2FA%3E%20which%20makes%20automation%20easy.%20Check%20%3CSPAN%3Eit%20out%20on%20how%20it%20can%20help%20your%20business%20with%20this%202%20minutes%20promotional%20video%20or%20reach%20out%20to%26nbsp%3B%3C%2FSPAN%3E%40NikCharlebois%20if%20you're%20interested%20to%20learn%20more%20about%20it.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAre%20you%20an%20organization%20using%20Endpoint%20protection%20outside%20of%20what%20ASC%20supports%3F%20Don%E2%80%99t%20worry%20anymore%2C%20go%20ahead%20and%20deploy%20this%20policy%20to%20witness%20the%20magic.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EReviewer%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ESpecial%20Thanks%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F124214%22%20target%3D%22_blank%22%3E%40Yuri%20Diogenes%3C%2FA%3E%2C%20Principal%20Program%20Manager%2C%26nbsp%3Bfor%20envisioning%20this%20and%20for%20all%20the%20inputs%20to%20this%20article.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Version history
Last update:
‎Oct 05 2020 06:22 AM