MappedClassType: unknown property. when using New-DbaCredential #8891
Unanswered
MrJackDuaner
asked this question in
Q&A
Replies: 2 comments
-
I can repro this when New-Object Microsoft.SqlServer.Management.Smo.Credential is an array (like New-Object Microsoft.SqlServer.Management.Smo.Credential -OutVariable a; $a.MappedClassType = 1) I'll take a look and see how i can fix it 👍🏼 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Good morning. Did you find a solution on how to fix this? Best regards. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good morning,
I want to migrate one or more databases from SQL Azure to SQL Server by using a temporary Azure storage for the backup.
I found this detailed article on how to do it : Automate migration to SQL Managed Instance using Azure PowerShell and DbaTools
The connections to the databases are running fine, same for the creation of the resource group, the storage account and storage container.
But when the New-DbaCredential occurs, the error "MappedClassType: unknown property." is displayed.
Here is a short version of my script for debugging :
And here is the output of the PowerShell console :
I have searched for days a solution on the Web, but I didn't succeed.
The error comes from New-DbaCredential function when creating new object Microsoft.SqlServer.Management.Smo.Credential :
I thought the error occured because I didn't have SMO on my computer, so I've downloaded NuGet Package Microsoft.SqlServer.SqlManagementObjects and loaded the file Microsoft.SqlServer.Smo.dll in my script, but it didn't fix the issue.
Any help on how I can solve this issue is welcome and thanks in advance for the answers.
Beta Was this translation helpful? Give feedback.
All reactions