This operation deletes a policy exemption, given its name and the scope it was created in.
The scope of a policy exemption is the part of its ID preceding '/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}'.
This operation deletes a policy exemption, given its name and the scope it was created in.
The scope of a policy exemption is the part of its ID preceding '/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}'.
Examples
Example 1: Remove policy exemption by name and scope
The first command gets a resource group named ResourceGroup11 by using the Get-AzResourceGroup cmdlet.
The command stores that object in the $ResourceGroup variable.
The second command removes the policy exemption named PolicyExemption07 that was assigned at a resource group level.
The ResourceId property of $ResourceGroup identifies the resource group.
The first command gets a resource group named ResourceGroup11, and then stores that object in the $ResourceGroup variable.
The second command gets the policy exemption at a resource group level, and then stores it in the $PolicyExemption variable.
The ResourceId property of $ResourceGroup identifies the resource group.
The final command removes the policy exemption that the ResourceId property of $PolicyExemption identifies.
Example 3: [Backcompat] Remove policy exemption by ID
The first command gets a resource group named ResourceGroup11, and then stores that object in the $ResourceGroup variable.
The second command gets the policy exemption at a resource group level, and then stores it in the $PolicyExemption variable.
The ResourceId property of $ResourceGroup identifies the resource group.
The final command removes the policy exemption that the ResourceId property of $PolicyExemption identifies.
Parameters
-BackwardCompatible
Causes cmdlet to return artifacts using legacy format placing policy-specific properties in a property bag object.
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
The scope of the policy exemption.
Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.