Hello, @sac16 !
How do I enable Dynamic Scoping across multiple subscriptions with a PowerShell script?
Dynamic Scoping allows you to group machines based on criteria such as subscription, resource group, location, resource type, OS Type, and Tags. In the documentation for New-AzConfigurationAssignment
, I see a -Filter
for everything mentioned above except subscriptions (with the only mention of subscriptions being under -DefaultProfile
).
If we look at the Azure CLI equivalent, az maintenance assignment
, create-or-update-subscription
has a parameter for --subscription
. I would recommend using the Azure CLI command in this instance for your PowerShell script.
If you need another solution, please let us know in the comments and we would be happy to help.
I hope this has been helpful! Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!