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

Get-AzureRmStorageAccount :: Incorrect Output

Open pcgeek86 opened this issue 10 years ago • 4 comments

Issue

When invoking the Get-AzureRmStorageAccount command, with only the -Name parameter, the parameter is ignored, and all Storage Accounts are returned, as if the parameter was not even specified.

Expected Result

The Get-AzureRmStorageAccount command, when invoked with only the -Name parameter, should return one, and only one, Storage Account.

bug

Cheers, Trevor Sullivan Microsoft MVP: PowerShell http://trevorsullivan.net http://twitter.com/pcgeek86

pcgeek86 avatar Feb 13 '16 19:02 pcgeek86

@pcgeek86 Unfortunately, the design would be to throw an error saying 'please specify a resource group', which is perhaps even more wrong than the current behavior. Assigning to the storage team. Defaulting to Find functionality is something we should consider as the pattern for each RP.

markcowl avatar Feb 17 '16 04:02 markcowl

Thanks @pcgeek86 for bringing this to us. It needs both resource group name and account name to fetch a particular account in ARM, only specifying -Name in Get-AzureRmStorageAccount should not be an available operation. We'll get the fix into the nearest sprint.

EmmaZhu avatar Mar 14 '16 00:03 EmmaZhu

Feel free to try the newly released version and let us know if you have further questions.

vinjiang avatar May 06 '16 07:05 vinjiang

@EmmaZhu @vinjiang @markcowl Thanks, looks good to me!

image

pcgeek86 avatar May 06 '16 15:05 pcgeek86