nerdexam
MicrosoftMicrosoft

AZ-500 · Question #505

AZ-500 Question #505: Real Exam Question with Answer & Explanation

The correct sequence uses Get-AzPolicyRemediation to retrieve existing remediation tasks and check the status of Policy1's compliance, Set-AzContext to switch the PowerShell session context to the correct subscription (Sub1), and Start-AzPolicyRemediation to actually trigger the

Submitted by miguelv· Mar 6, 2026Manage Azure identities and governance - specifically implementing and managing Azure Policy, including remediating non-compliant resources using PowerShell cmdlets (AZ-104 / AZ-305 domain: Governance)

Question

Drag and Drop Question You have two Azure subscriptions named Sub1 and Sub2. Sub1 contains a resource group named RG1 and an Azure policy named Policy1. You need to remediate the non-compliant resources in Sub1 based on Policy1. How should you complete the PowerShell script? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Answer:

Explanation

The correct sequence uses Get-AzPolicyRemediation to retrieve existing remediation tasks and check the status of Policy1's compliance, Set-AzContext to switch the PowerShell session context to the correct subscription (Sub1), and Start-AzPolicyRemediation to actually trigger the remediation process that brings non-compliant resources into compliance with Policy1. This three-step flow - retrieve policy info, set subscription context, then start remediation - is the standard Azure PowerShell pattern for policy remediation.

Topics

#Azure Policy#PowerShell Remediation#Subscription Management#Governance and Compliance

Community Discussion

No community discussion yet for this question.

Full AZ-500 PracticeBrowse All AZ-500 Questions