A parameter cannot be found that matches parameter name 'MaxSizeGB'

2.1k views Asked by At

New-AzureSqlDatabase command on execution suddently started failing with parameter not found message. MSDN link mentions the parameter as supported. https://msdn.microsoft.com/en-us/library/dn546722.aspx

Command : New-AzureSqlDatabase

Input

PS C:\scripts>$database1 = New-AzureSqlDatabase -ServerName "lpqd0zbrseg" -DatabaseName "Database1" -Edition "Business" -MaxSizeGB 50 -Collation "SQL_Latin1_General_CP1_CI_AS"

Output Error

New-AzureSqlDatabase : A parameter cannot be found that matches parameter name 'MaxSizeGB'. At line:1 char:103 + ... dition "Basic" -MaxSizeGB 1 -Collation "SQL_Latin1_General_CP1_CI_AS" + ~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [New-AzureSqlDatabase], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands.Sql.Database.Cmdlet.NewAzureSqlDatabas

What would be the reason that MaxSizeGB parameter got not found on execution. Thanks in advance

With Regards,

H Bala

1

There are 1 answers

1
jangelfdez On BEST ANSWER

Business and Wed editions are a deprecated service level. Now, the service levels are Free, Basic, Standard & Premium as the error shows.

About the parameter, are you using the Azure PowerShell module configured as "Resource Manager" or "Service Management"? The first one hasn't that value but the second one have it.

You can change it with "Switch-AzureMode". You can find the explanation in the second section of the page.