I am an Azure engineer and administrator that is trying to get on top of Azure PowerShell so that I can deploy and manage Azure resources using Infrastructure as Code. I know the basics of PowerShell, however, I would very much like to become an expert at the subject.
An example of this is deploying Azure resource groups, something fairly simple to do when trying to deploy a single group, but when deploying multiple groups I am struggling to write the code more efficiently.
New-AzSubscriptionDeployment -Name $DeploymentName -Location UKSouth -TemplateFile Location -TemplateParameterFile Location
If I wanted to create multiple resource groups I would just run this command twice but change the details in the ARM template, however, I wanted to know how to create multiple resource groups using a single PowerShell command if possible?
If someone could point me in the right direction I would be grateful.