You can use Azure portal, Azure CLI or PowerShell to check if an Azure resource group exists.
Check if Azure resource group exists using Azure CLI:
1 2 3 |
## Check if Azure resource group exists az group exists \ --name |
Check if Azure resource group exists using PowerShell:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
## Check if Azure resource group exists Get-AzResourceGroup ` -Name -ErrorVariable notPresent ` -ErrorAction SilentlyContinue if ($notPresent) { # ResourceGroup doesn't exist } else { # ResourceGroup exist } |