Skip to content
Azure Lessons
Azure Lessons
  • Home
  • AWS
  • Azure VM
  • Azure AD
  • Azure tutorial
    • Azure Cognitive Services
    • Azure Machine Learning
    • Azure DevOps

Method ‘get_SerializationSettings’ error when Login-AzureRMAccount

December 16, 2020July 4, 2020 by Bijay Kumar

In this Azure tutorial, we will discuss how to fix the error, Method ‘get_SerializationSettings’ in type
‘Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient’ from assembly ‘Microsoft.Azure.Commands.ResourceManager.Common,Version=4.0.0.0,Culture=neutralPublicKeyToken=31bf3856ad364e35’ does not have an implementation
, Method ‘get_SerializationSettings’ error when Login-AzureRMAccount

Table of Contents

  • Method ‘get_SerializationSettings’ error when Login-AzureRMAccount
  • method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources

Method ‘get_SerializationSettings’ error when Login-AzureRMAccount

Recently, while trying to execute the script to upload and download the file from the Azure storage container using PowerShell, I got the above error.

The complete PowerShell script was as below

Login-AzureRmAccount
$Keys2 = "Coro2SvGOTD+nT3YdaKCrnauzWvHMF6BmuD9PfSKtNJWt6etO@@@@@@@@@@@@@@@@@@@@@@@@@@@=="
$StorageContext2 = New-AzureStorageContext -StorageAccountName sqlvaqrc7kssdx4eus -StorageAccountKey $Keys2
$containerName2 = "democontainer2";
Set-AzStorageBlobContent -File "D:\Bijay\Upload3.txt" `
  -Container $containerName2 `
  -Blob "Upload3.txt" `
  -Context $StorageContext2 
Method 'get_SerializationSettings' does not have an implementation
method ‘get_serializationsettings’ in type

The complete error message was as below

Login-AzureRMAccount : Method ‘get_SerializationSettings’ in type
‘Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient’ from
assembly ‘Microsoft.Azure.Commands.ResourceManager.Common, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35’ does not have an
implementation.

At line:1 char:1
+ Login-AzureRMAccount
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-AzureRmAccount], TypeL
oadException

Note: The reason we are getting this error is that we have Az and AzureRM modules installed, and the AzureRM module is loaded when we are trying to use the Az module.

method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources

To fix the above issue, you need to follow the below steps

Run your PowerShell ISE or Windows PowerShell as an administrator mode

Method ‘get_SerializationSettings’ error when Login-AzureRMAccount
method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources.resourcemanagementclient’ from assembly

Hoping by now, you have the AzureRM module is installed in your machine. If not, you can install the AzureRM module by following my article The term ‘Login-AzureRmAccount’ is not recognized as the name of a cmdlet

Well, the next step to fix this issue is, run the below Enable-AzureRmAlias cmdlet on your PowerShell ISE

PS C:\WINDOWS\system32> Enable-AzureRmAlias -Scope CurrentUser
method 'get_serializationsettings' in type 'microsoft.azure.management.internal.resources
get_serializationsettings

Now if you will run the below PowerShell script, it will run successfully.

Login-AzureRmAccount
$Keys2 = "Coro2SvGOTD+nT3YdaKCrnauzWvHMF6BmuD9PfSKtNJWt6etO@@@@@@@@@@@@@@@@@@@@@@@@@@@=="
$StorageContext2 = New-AzureStorageContext -StorageAccountName sqlvaqrc7kssdx4eus -StorageAccountKey $Keys2
$containerName2 = "democontainer2";
Set-AzStorageBlobContent -File "D:\Bijay\Upload3.txt" `
  -Container $containerName2 `
  -Blob "Upload3.txt" `
  -Context $StorageContext2 

Now it will ask to enter the credentials and click on the Sign in button.

method 'get_serializationsettings' in type 'microsoft.azure.management.internal.resources.resourcemanagementclient' from assembly 'microsoft.azure.commands.resourcemanager.common, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' does not have an implementation.
method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources.resourcemanagementclient’

Then it executed successfully with out any issue.

login-azurermaccount : method 'get_serializationsettings' in type 'microsoft.azure.management.internal.resources.resourcemanagementclient' from assembly 'microsoft.azure.commands.resourcemanager.common, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' does not have an implementation.
get_serializationsettings does not have an implementation

You may like to follow the below tutorials

  • How to add bulk guest users in Azure AD B2B from Azure Portal and PowerShell
  • How to backup Azure blob storage using PowerShell

Conclusion

Well, in this Azure tutorial, we discussed how to fix the error “Method ‘get_SerializationSettings’ in type
‘Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient’ from assembly ‘Microsoft.Azure.Commands.ResourceManager.Common,Version=4.0.0.0,Culture=neutralPublicKeyToken=31bf3856ad364e35’ does not have an implementation
“. The above solution will also fix the below errors

  • method ‘get_serializationsettings’ in type
  • get_serializationsettings
  • method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources.resourcemanagementclient’ from assembly ‘microsoft.azure.commands.resourcemanager.common, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35’ does not have an implementation.
  • method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources.resourcemanagementclient’
  • get_serializationsettings does not have an implementation

I Hope it will help you to fix your issue as well !!!.

The term ‘Login-AzureRmAccount’ is not recognized as the name of a cmdlet error
The term ‘connect-azaccount’ is not recognized as the name of a cmdlet

Follow Us

Follow us on Twitter Subscribe us on Youtube

Recent Posts

  • How to get client id and client secret in Azure Portal
  • AWS vs Salesforce
  • Azure vs Oracle Cloud
  • Azure vs Salesforce
  • Azure Active Directory For Education
  • About
  • Contact
  • Privacy Policy
  • Sitemap
© 2023 Azure Lessons