Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Enforce security configuration of Azure-managed servers by using Azure Machine Configuration

A worked example

Single answer

Contoso runs existing Windows Server Azure VMs that host factory automation software. The software requires a Contoso-specific registry DWORD value. You will deliver this value with a custom Azure Machine Configuration package and a policy that deploys its guest assignment.

Requirements:

  1. The deployed configuration must set the value, not only report it.
  2. The VMs that already exist must be brought into compliance as part of the rollout.
  3. If an administrator later changes the value inside the guest OS, the value must be corrected at the next guest evaluation without running another Azure Policy remediation task.

The prerequisite initiative is already deployed. The policy assignment's managed identity holds the required roles, and the VMs can download any package you publish.

Which deployment approach meets all the requirements?

Choose one answer
Why

Three separate layers must line up. First, the package must be AuditAndSet so it carries code that can apply the registry value. Second, the guest assignment type must be ApplyAndAutoCorrect so later drift is fixed at the next guest evaluation; ApplyAndMonitor only reports guest-only drift. Third, existing VMs need an initial remediation task for the deploying policy. After that first deployment, no recurring remediation task is needed for drift correction.

  • Not correct: Audit package; DeployIfNotExists policy with ApplyAndAutoCorrect; initial remediation task for existing VMs. An Audit package only checks settings. Only an AuditAndSet package contains the resource code that can apply the configuration, and the package's capability limits what the assignment type can do.
  • Not correct: AuditAndSet package; DeployIfNotExists policy with ApplyAndAutoCorrect; policy evaluation, no remediation task. For existing machines, a deployment policy needs an initial remediation task. Without one, the existing VMs are not brought into compliance during the rollout.
  • Not correct: AuditAndSet package; DeployIfNotExists policy with ApplyAndMonitor; initial remediation task for existing VMs. ApplyAndMonitor applies changes when remediation is triggered. Later drift made only inside the guest is reported rather than continuously corrected, so requirement 3 fails.
  • Correct: AuditAndSet package; DeployIfNotExists policy with ApplyAndAutoCorrect; initial remediation task for existing VMs. An AuditAndSet package contains resource code that can apply the setting. The initial remediation task prepares existing machines. ApplyAndAutoCorrect corrects later drift at the next guest evaluation without a recurring remediation task.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free