- This topic has 4 replies, 3 voices, and was last updated 2 months, 1 week ago by
March 18, 2020 at 2:05 am #210930
Just trying to create a new Azure SQL Server by using New-AzureRmSQLServer. The username and password are already available in variables. I’m trying code like this:
# Create the administrator credentials
$secureAdministratorPassword = ConvertTo-SecureString $administratorPassword -AsPlainText -Force
$sqlServerAdministratorCredentials = New-Object PSCredential($administratorUserName, $secureAdministratorPassword)
# Create the SQL Server
New-AzureRmSQLServer -ServerName $sqlServerName `
-SqlAdministratorCredentials $sqlServerAdministratorCredentials `
-Location $datacentreLocation `
But I’m ending up with the following error that really doesn’t give much of a clue about the issue:
New-AzureRmSQLServer : Method ‘get_SerializationSettings’ in type ‘Microsoft.Azure.Management.Sql.SqlManagementClient’
from assembly ‘Microsoft.Azure.Management.Sql, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ does
not have an implementation.
Is there a wrong version of one of the dependencies?
March 18, 2020 at 2:41 am #210933ParticipantTopics: 4Replies: 2231Points: 5,414Rank: Community MVP
When you crosspost the same question at the same time to different forums you should at least post links to the other forums along with your question to avoid people willing to help making their work twice or more.
March 18, 2020 at 3:14 am #210936
I was trying to work out how to remove it from here (after posting, I thought SO might be a better option), but for the life of me, I can’t find a “delete” button. The “Edit” option doesn’t offer a Delete either. Is there one?
March 18, 2020 at 3:27 am #210939
I have no idea why the AzureRm option doesn’t work, but I changed all the code to use Az instead, and it all just works.
So nothing else required thanks.
March 18, 2020 at 1:31 pm #210990ParticipantTopics: 12Replies: 516Points: 1,182Rank: Community Hero
Use the current New-AzSqlServer cmdlet of the AZ PS module (Az.Sql)
You also need to uninstall-module AzureRM
- You must be logged in to reply to this topic.