Get-AzureRmStorageAccount:: Name parameter is ignored if ResourceGroup not supplied
The Get-AzureRmStorageAccount cmdlet seems to ignore the -Name parameter if the ResourceGroup is not supplied.
I have three storage accounts X, Y and Z in two resource groups, A (X & Y) and B (Z):
# Returns X, Y and Z
Get-AzureRmStorageAccount
# Returns X & Y
Get-AzureRmStorageAccount -ResourceGroup A
# Returns Z
Get-AzureRmStorageAccount -ResourceGroup B
# Returns X
Get-AzureRmStorageAccount -ResourceGroup A -Name X
# Returns X, Y & Z
Get-AzureRmStorageAccount -Name X
@bd4hjimp Thanks for the report - seems like it should either throw in this instance for insufficient parameters or filter by name. Will assign to the appropriate folks to take a look.
Thanks @bd4hjimp 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 next release.
You may want to try the newly released version and let us know if you have further questions.