ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 362 - AZ-500 discussion

Report
Export

DRAG DROP

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.


Question 362
Correct answer: Question 362

Explanation:

For the first blank, use Set-AzContext to set the current subscription context.

For the second blank, use Start-AzPolicyRemediation to create and start a policy remediation for a policy assignment.

The final script should look like this:

$policyAssignmentId = "/subscriptions/f0710c27-9663-4c05-19781bdbedle86as/providers/Microsoft.

Authorization/f Value Set-AzContext -Subscription “Sub1”

Value Start-AzPolicyRemediation -PolicyAssignmentld $policyAssignmentId -Name "policy1” ResourceDiscovery

asked 02/10/2024
Andreas Krieger
34 questions
User
0 comments
Sorted by

Leave a comment first