azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

ErrorAction does not work with Get-AzureRmResourceGroup

Open rajaprad opened this issue 10 years ago • 2 comments

Hi,

I am trying to suppress error from Get-AzureRmResourceGroup however it is not taking effect with ErrorActionPreference.

Get-AzureRmResourceGroup -Name "howareyou" -Location "East US" -ErrorAction SilentlyContinue

Get-AzureRmResourceGroup : Provided resource group does not exist. At line:1 char:1

  • Get-AzureRmResourceGroup -ErrorAction SilentlyContinue -Name "howareyou" ...
  • - CategoryInfo          : NotSpecified: (:) [Get-AzureRmResourceGroup], ArgumentException
    - FullyQualifiedErrorId : System.ArgumentException,Microsoft.Azure.Commands.Resources.GetAzureResourceGroupCommand
    
    

Thanks, Pradebban Raja

rajaprad avatar Dec 08 '15 15:12 rajaprad

This have been fixed in the latest release. I am using v1.0.4.

slapointe avatar Dec 21 '15 18:12 slapointe

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rthorn17

ghost avatar Aug 14 '19 19:08 ghost