Sep 08 2021 09:59 PM - edited Sep 08 2021 10:21 PM
Hi ,
I am trying to Assign policy using the Azure Powershell to the resource group
First Creating RG-----------------------
$rg=New-AzResourceGroup -Name "My_New_resource_Group" -Location "East Us"
Second Assigning Policy definition------------------
$Document=Get-AzPolicyDefinition | Where-Object{$_.Properties.DisplayName -eq "Audit Missing tagss on Resource Groups"}
Third Assigning policy to the RG-------------------------
New-AzPolicyAssignment -Name "CheckPolicy" -DisplayName "Check Policy" -Scope $rg.ResourceId -PolicyDefinition $Document
but I get this prompt asking for the allowed locations( Attached screenshot ) . How to resolve this
Sep 16 2021 11:30 AM