Check If Azure Resource Group Exist - Azure Powershell
问题 I'm trying to verify if ResourceGroup exist or not so i thought that following code should return true or false, but it doesn't output anything. $RSGtest = Find-AzureRmResource | Format-List ResourceGroupName | get-unique $RSGtest -Match "$myResourceGroupName" Why am I not getting any output? 回答1: There is a Get-AzureRmResourceGroup cmdlet: Get-AzureRmResourceGroup -Name $myResourceGroupName -ErrorVariable notPresent -ErrorAction SilentlyContinue if ($notPresent) { # ResourceGroup doesn't