SOLVED: How To Add Location Tag To Azure Automation Account
The Azure Automation Account serves as a container for all your runbook, runbook executions (jobs), and the assets that your runbooks depend on. Here’s How To Add Location Tag To Azure Automation Account

You May Also Like: Do I need To Install Antivirus Software On My PC, Tablet And Smartphone? Lets Find Out!
Here’s How To Add Location Tag To Collect The VM’s bases On The Location (eus/eu)
Use this script with your automation accounts:
{
“Logging in to Azure…”
Connect-AzAccount -Identity
}
catch {
Write-Error -Message $.Exception
throw $.Exception
}
$vms = Get-AzVM | Where-Object {($_.Tags[‘location’] -eq “eu”) -and ($_.Tags[‘autostart’] -eq “true”)}
foreach($vm in $vms)
{
Start-AzVM -ResourceGroupName $vm.ResourceGroupName -Name $vm.Name
Write-Output “Started $($vm.Name)”
}
You May Also Like: SOLVED – How To Update Connection Policy Of Synapse Dedicated SQL Pools
Note
You can use one Azure automation account for all your subscriptions. The costs of Azure Automation are the Job Run Time and the number of Watchers. You can calculate costs in Azure is using the Azure Pricing Calculator: https://azure.microsoft.com/en-us/pricing/calculator/