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

Get-AzureRmSqlServer 'ServerName' parameter and property should be called 'Name'

Open SiloReed opened this issue 9 years ago • 5 comments

Cmdlet(s)

Get-AzureRmSqlServer

PowerShell Version

PSVersion 5.1.15063.296

Module Version

AzureRM.Sql 3.0.0

OS Version

BuildVersion 10.0.15063.296

Description

Get-AzureRmSqlServer's ServerName parameter and property should be called Name to be consistent with other cmdlets such as Get-AzureRmAnalysisServicesServer and Get-AzureRMVM

Debug Output

Instructions: to get Debug Output, set $DebugPreference="Continue" and then execute the cmdlet or script causing the issue

Script/Steps for Reproduction

Get-AzureRmSqlServer -ResourceGroupName rg-ODSTest -Name azrodstst01 fails with: Get-AzureRmSqlServer : A parameter cannot be found that matches parameter name 'Name'.

SiloReed avatar Jun 07 '17 19:06 SiloReed

@akromm Hey Adam, would you mind taking a look at this issue?

cormacpayne avatar Jun 07 '17 19:06 cormacpayne

@SiloReed We could add an Alias for the parameter name.

For the property name (I assume you are referring to the property on the server object that is returned) we have it as "ServerName" so that piping the output of one cmdlet into another works.

eg: Get-AzureRmResourceGroup | Get-AzureRmSqlServer | New-AzureRmSqlDatabase ... will create a new database in every server in every resource group in your subscription.

akromm-zz avatar Jun 07 '17 20:06 akromm-zz

Thanks for the suggestion @SiloReed . We will investigate and address this soon, but we have some other higher priority fixes for SQL cmdlets that we are working on first. Cheers

jaredmoo avatar Jun 09 '17 17:06 jaredmoo

I found a couple minutes of free time: #4110

akromm-zz avatar Jun 09 '17 20:06 akromm-zz

Resolved with #4110

akromm-zz avatar Jun 13 '17 17:06 akromm-zz