Replies: 1 comment
-
Hi @ivanbm97 , Please try $subscriptions | Foreach-Object { Get-AzPolicyExemption -Scope "/subscriptions/$_" } |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm writing a script which has to search for exemptions for certain policies in the whole tenant, but I've noticed that the command Get-AzPolicyExemption won't return exceptions from other subscriptions nor RGs that don't belong to the subscription context. I've also tried the -IncludeDescent argument but sadly it's not supported for Management Group scopes. So my question is, do I really need to iterate and change the context through each of the subscriptions in the tenant in order to find all the exceptions or is there any other option I'm missing? Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions