Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

Get-AzKeyVault error: Method 'get_SerializationSettings' ... does not have an implementation. #7516

Closed glaisne closed 6 years ago

glaisne commented 6 years ago

Description

using 0.3.0 of az modules, running 'Get-AzKeyVault' or 'Get-AzKeyVault -vaultName -ResourceGroupName ' result in the following error:

writeErrorStream : True PSMessageDetails : Exception : System.TypeLoadException: Method 'get_SerializationSettings' in type 'Microsoft.Azure.Management.KeyVault.KeyVaultManagementClient' from assembly 'Microsoft.Azure.Management.KeyVault, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. at Microsoft.Azure.Commands.KeyVault.Models.VaultManagementClient..ctor(IAzureContext context) at Microsoft.Azure.Commands.KeyVault.KeyVaultManagementCmdletBase.get_KeyVaultManagementClient() at Microsoft.Azure.Commands.KeyVault.GetAzureKeyVault.ExecuteCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() TargetObject : CategoryInfo : CloseError: (:) [Get-AzKeyVault], TypeLoadException FullyQualifiedErrorId : Microsoft.Azure.Commands.KeyVault.GetAzureKeyVault ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : at , : line 1 PipelineIterationInfo : {0, 1}

Script/Steps for Reproduction

Import-module az.keyvault
get-AzKeyVault

Module Version

get-Module
PS ProjectScripts:\azure\tests> get-module | ft ModuleType, Version, Name -auto

ModuleType Version Name
---------- ------- ----
    Script 0.3.0   Az.KeyVault
    Script 0.3.0   Az.Network
    Script 0.3.0   Az.Profile
    Script 0.3.0   Az.Resources
    Script 0.3.0   Az.Storage
    Binary 1.0.0.0 CimCmdlets
    Script 1.0.0   Hosts
  Manifest 3.0.0.0 Microsoft.PowerShell.Host
  Manifest 3.1.0.0 Microsoft.PowerShell.Management
  Manifest 3.0.0.0 Microsoft.PowerShell.Security
  Manifest 3.1.0.0 Microsoft.PowerShell.Utility
  Manifest 3.0.0.0 Microsoft.WSMan.Management
    Script 4.3.1   Pester
    Script 1.2     PSReadline
    Script 0.0     PSReadLineTheme

Get-Module -ListAvailable | ft ModuleType, Version, Name -auto

ModuleType Version     Name                                     
---------- -------     ----                                     
    Script 0.2.0       ADTools                                  
    Script 0.3.0       Az.Aks                                   
    Script 0.2.2       Az.Aks                                   
    Script 0.3.0       Az.AnalysisServices                      
    Script 0.2.2       Az.AnalysisServices                      
    Script 0.3.0       Az.ApiManagement                         
    Script 0.2.2       Az.ApiManagement                         
    Script 0.3.0       Az.ApplicationInsights                   
    Script 0.2.2       Az.ApplicationInsights                   
    Script 0.3.0       Az.Automation                            
    Script 0.2.2       Az.Automation                            
    Script 0.3.0       Az.Batch                                 
    Script 0.2.2       Az.Batch                                 
    Script 0.3.0       Az.Billing                               
    Script 0.2.2       Az.Billing                               
    Script 0.3.0       Az.Cdn                                   
    Script 0.2.2       Az.Cdn                                   
    Script 0.3.0       Az.CognitiveServices                     
    Script 0.2.2       Az.CognitiveServices                     
    Script 0.3.0       Az.Compute                               
    Script 0.2.2       Az.Compute                               
    Script 0.3.0       Az.Compute.ManagedService                
    Script 0.3.0       Az.Consumption                           
    Script 0.2.2       Az.Consumption                           
    Script 0.3.0       Az.ContainerInstance                     
    Script 0.2.2       Az.ContainerInstance                     
    Script 0.3.0       Az.ContainerRegistry                     
    Script 0.2.2       Az.ContainerRegistry                     
    Script 0.3.0       Az.DataLakeAnalytics                     
    Script 0.2.2       Az.DataLakeAnalytics                     
    Script 0.3.0       Az.DataLakeStore                         
    Script 0.2.2       Az.DataLakeStore                         
    Script 0.3.0       Az.DataMigration                         
    Script 0.3.0       Az.DeviceProvisioningServices            
    Script 0.3.0       Az.DevSpaces                             
    Script 0.3.0       Az.DevTestLabs                           
    Script 0.2.2       Az.DevTestLabs                           
    Script 0.3.0       Az.Dns                                   
    Script 0.2.2       Az.Dns                                   
    Script 0.3.0       Az.EventGrid                             
    Script 0.2.2       Az.EventGrid                             
    Script 0.3.0       Az.EventHub                              
    Script 0.2.2       Az.EventHub                              
    Script 0.3.0       Az.Insights                              
    Script 0.2.2       Az.Insights                              
    Script 0.3.0       Az.IotHub                                
    Script 0.2.2       Az.IotHub                                
    Script 0.3.0       Az.KeyVault                              
    Script 0.2.2       Az.KeyVault                              
    Script 0.3.0       Az.LogicApp                              
    Script 0.2.2       Az.LogicApp                              
    Script 0.3.0       Az.MachineLearning                       
    Script 0.2.2       Az.MachineLearning                       
    Script 0.3.0       Az.MachineLearningCompute                
    Script 0.2.2       Az.MachineLearningCompute                
    Script 0.3.0       Az.ManagedServiceIdentity                
    Script 0.3.0       Az.ManagementPartner                     
    Script 0.3.0       Az.Maps                                  
    Script 0.3.0       Az.MarketplaceOrdering                   
    Script 0.2.2       Az.MarketplaceOrdering                   
    Script 0.3.0       Az.Media                                 
    Script 0.2.2       Az.Media                                 
    Script 0.3.0       Az.Network                               
    Script 0.2.2       Az.Network                               
    Script 0.3.0       Az.NotificationHubs                      
    Script 0.2.2       Az.NotificationHubs                      
    Script 0.3.0       Az.OperationalInsights                   
    Script 0.2.2       Az.OperationalInsights                   
    Script 0.3.0       Az.PolicyInsights                        
    Script 0.2.2       Az.PolicyInsights                        
    Script 0.3.0       Az.PowerBIEmbedded                       
    Script 0.2.2       Az.PowerBIEmbedded                       
    Script 0.3.0       Az.Profile                               
    Script 0.2.2       Az.Profile                               
    Script 0.3.0       Az.RecoveryServices                      
    Script 0.3.0       Az.RedisCache                            
    Script 0.2.2       Az.RedisCache                            
    Script 0.3.0       Az.Relay                                 
    Script 0.2.2       Az.Relay                                 
    Script 0.3.0       Az.Reservations                          
    Script 0.3.0       Az.ResourceGraph                         
    Script 0.3.0       Az.Resources                             
    Script 0.2.2       Az.Resources                             
    Script 0.3.0       Az.Search                                
    Script 0.3.0       Az.ServiceBus                            
    Script 0.2.2       Az.ServiceBus                            
    Script 0.3.0       Az.ServiceFabric                         
    Script 0.2.2       Az.ServiceFabric                         
    Script 0.3.0       Az.SignalR                               
    Script 0.3.0       Az.Sql                                   
    Script 0.2.3       Az.Sql                                   
    Script 0.3.0       Az.Storage                               
    Script 0.2.2       Az.Storage                               
    Script 0.3.0       Az.StreamAnalytics                       
    Script 0.2.2       Az.StreamAnalytics                       
    Script 0.3.0       Az.Tags                                  
    Script 0.2.2       Az.Tags                                  
    Script 0.3.0       Az.TrafficManager                        
    Script 0.2.2       Az.TrafficManager                        
    Script 0.3.0       Az.UsageAggregates                       
    Script 0.2.2       Az.UsageAggregates                       
    Script 0.3.0       Az.Websites                              
    Script 0.2.2       Az.Websites                              
    Script 5.1.2       Azure                                    
    Script 0.5.4       Azure.AnalysisServices                   
    Script 0.5.1       Azure.AnalysisServices                   
  Manifest 0.5.0       Azure.AnalysisServices                   
    Script 0.4.6       Azure.AnalysisServices                   
    Script 0.4.0       Azure.AnalysisServices                   
    Script 4.5.0       Azure.Storage                            
    Script 4.3.1       Azure.Storage                            
    Script 4.2.1       Azure.Storage                            
    Script 4.2.0       Azure.Storage                            
    Script 3.4.0       Azure.Storage                            
    Script 3.1.0       Azure.Storage                            
    Binary 2.0.1.16    AzureAD                                  
    Binary 2.0.0.131   AzureAD                                  
    Binary 2.0.1.18    AzureADPreview                           
    Script 6.7.0       AzureRM                                  
    Script 6.3.0       AzureRM                                  
    Script 5.7.0       AzureRM                                  
    Script 5.5.0       AzureRM                                  
    Script 4.4.0       AzureRM                                  
    Script 4.1.0       AzureRM                                  
    Script 0.6.12      AzureRM.AnalysisServices                 
    Script 0.6.8       AzureRM.AnalysisServices                 
    Script 0.6.6       AzureRM.AnalysisServices                 
    Script 0.6.4       AzureRM.AnalysisServices                 
    Script 0.4.6       AzureRM.AnalysisServices                 
    Script 0.4.0       AzureRM.AnalysisServices                 
    Script 6.1.3       AzureRM.ApiManagement                    
    Script 6.1.0       AzureRM.ApiManagement                    
    Script 5.1.2       AzureRM.ApiManagement                    
    Script 5.1.0       AzureRM.ApiManagement                    
    Script 4.4.0       AzureRM.ApiManagement                    
    Script 4.1.0       AzureRM.ApiManagement                    
    Script 0.1.6       AzureRM.ApplicationInsights              
    Script 0.1.4       AzureRM.ApplicationInsights              
    Script 0.1.3       AzureRM.ApplicationInsights              
    Script 0.1.1       AzureRM.ApplicationInsights              
    Script 5.0.4       AzureRM.Automation                       
    Script 5.0.0       AzureRM.Automation                       
    Script 4.3.2       AzureRM.Automation                       
    Script 4.3.0       AzureRM.Automation                       
    Script 3.4.0       AzureRM.Automation                       
    Script 3.1.0       AzureRM.Automation                       
    Script 4.0.8       AzureRM.Backup                           
    Script 4.0.5       AzureRM.Backup                           
    Script 4.0.4       AzureRM.Backup                           
    Script 4.0.2       AzureRM.Backup                           
    Script 3.4.0       AzureRM.Backup                           
    Script 3.1.0       AzureRM.Backup                           
    Script 4.1.3       AzureRM.Batch                            
    Script 4.1.0       AzureRM.Batch                            
    Script 4.0.6       AzureRM.Batch                            
    Script 4.0.4       AzureRM.Batch                            
    Script 3.4.0       AzureRM.Batch                            
    Script 3.1.0       AzureRM.Batch                            
    Script 0.14.5      AzureRM.Billing                          
    Script 0.14.2      AzureRM.Billing                          
    Script 0.14.1      AzureRM.Billing                          
    Script 0.14.0      AzureRM.Billing                          
    Script 0.13.6      AzureRM.Billing                          
    Script 0.13.0      AzureRM.Billing                          
    Script 5.0.3       AzureRM.Cdn                              
    Script 5.0.0       AzureRM.Cdn                              
    Script 4.2.2       AzureRM.Cdn                              
    Script 4.2.0       AzureRM.Cdn                              
    Script 3.4.0       AzureRM.Cdn                              
    Script 3.1.0       AzureRM.Cdn                              
    Script 0.9.8       AzureRM.CognitiveServices                
    Script 0.9.5       AzureRM.CognitiveServices                
    Script 0.9.4       AzureRM.CognitiveServices                
    Script 0.9.2       AzureRM.CognitiveServices                
    Script 0.8.6       AzureRM.CognitiveServices                
    Script 0.8.0       AzureRM.CognitiveServices                
    Script 5.5.0       AzureRM.Compute                          
    Script 5.1.1       AzureRM.Compute                          
    Script 4.6.0       AzureRM.Compute                          
    Script 4.4.0       AzureRM.Compute                          
    Script 3.4.0       AzureRM.Compute                          
    Script 3.1.0       AzureRM.Compute                          
    Script 0.3.7       AzureRM.Consumption                      
    Script 0.3.4       AzureRM.Consumption                      
    Script 0.3.3       AzureRM.Consumption                      
    Script 0.3.1       AzureRM.Consumption                      
    Script 0.3.0       AzureRM.Consumption                      
    Script 0.2.6       AzureRM.Consumption                      
    Script 0.2.0       AzureRM.Consumption                      
    Script 0.2.8       AzureRM.ContainerInstance                
    Script 0.2.6       AzureRM.ContainerInstance                
    Script 0.2.5       AzureRM.ContainerInstance                
    Script 0.2.3       AzureRM.ContainerInstance                
    Script 0.0.1       AzureRM.ContainerInstance                
    Script 1.0.8       AzureRM.ContainerRegistry                
    Script 1.0.5       AzureRM.ContainerRegistry                
    Script 1.0.4       AzureRM.ContainerRegistry                
    Script 1.0.2       AzureRM.ContainerRegistry                
    Script 0.2.6       AzureRM.ContainerRegistry                
    Script 0.2.0       AzureRM.ContainerRegistry                
    Script 5.0.3       AzureRM.DataFactories                    
    Script 5.0.0       AzureRM.DataFactories                    
    Script 4.2.2       AzureRM.DataFactories                    
    Script 4.2.0       AzureRM.DataFactories                    
    Script 3.4.0       AzureRM.DataFactories                    
    Script 3.1.0       AzureRM.DataFactories                    
    Script 0.5.8       AzureRM.DataFactoryV2                    
    Script 0.5.5       AzureRM.DataFactoryV2                    
    Script 0.5.3       AzureRM.DataFactoryV2                    
    Script 0.5.1       AzureRM.DataFactoryV2                    
    Script 0.2.0       AzureRM.DataFactoryV2                    
    Script 5.1.2       AzureRM.DataLakeAnalytics                
    Script 5.0.0       AzureRM.DataLakeAnalytics                
    Script 4.2.3       AzureRM.DataLakeAnalytics                
    Script 4.2.1       AzureRM.DataLakeAnalytics                
    Script 3.4.0       AzureRM.DataLakeAnalytics                
    Script 3.1.0       AzureRM.DataLakeAnalytics                
    Script 6.1.2       AzureRM.DataLakeStore                    
    Script 6.0.1       AzureRM.DataLakeStore                    
    Script 5.2.0       AzureRM.DataLakeStore                    
    Script 5.1.1       AzureRM.DataLakeStore                    
    Script 4.4.0       AzureRM.DataLakeStore                    
    Script 4.1.0       AzureRM.DataLakeStore                    
    Script 4.0.7       AzureRM.DevTestLabs                      
    Script 4.0.5       AzureRM.DevTestLabs                      
    Script 4.0.4       AzureRM.DevTestLabs                      
    Script 4.0.2       AzureRM.DevTestLabs                      
    Script 3.4.0       AzureRM.DevTestLabs                      
    Script 3.1.0       AzureRM.DevTestLabs                      
    Script 5.0.2       AzureRM.Dns                              
    Script 5.0.0       AzureRM.Dns                              
    Script 4.1.2       AzureRM.Dns                              
    Script 4.0.1       AzureRM.Dns                              
    Script 3.4.0       AzureRM.Dns                              
    Script 3.1.0       AzureRM.Dns                              
    Script 0.3.7       AzureRM.EventGrid                        
    Script 0.3.4       AzureRM.EventGrid                        
    Script 0.3.2       AzureRM.EventGrid                        
    Script 0.3.1       AzureRM.EventGrid                        
    Script 0.1.0       AzureRM.EventGrid                        
    Script 0.6.8       AzureRM.EventHub                         
    Script 0.6.4       AzureRM.EventHub                         
    Script 0.6.3       AzureRM.EventHub                         
    Script 0.6.1       AzureRM.EventHub                         
    Script 0.4.6       AzureRM.EventHub                         
    Script 0.4.0       AzureRM.EventHub                         
    Script 4.1.6       AzureRM.HDInsight                        
    Script 4.1.3       AzureRM.HDInsight                        
    Script 4.1.2       AzureRM.HDInsight                        
    Script 4.1.0       AzureRM.HDInsight                        
    Script 3.4.0       AzureRM.HDInsight                        
    Script 3.1.0       AzureRM.HDInsight                        
    Script 5.1.1       AzureRM.Insights                         
    Script 5.0.0       AzureRM.Insights                         
    Script 4.0.4       AzureRM.Insights                         
    Script 4.0.2       AzureRM.Insights                         
    Script 3.4.0       AzureRM.Insights                         
    Script 3.1.0       AzureRM.Insights                         
    Script 3.1.6       AzureRM.IotHub                           
    Script 3.1.3       AzureRM.IotHub                           
    Script 3.1.2       AzureRM.IotHub                           
    Script 3.1.0       AzureRM.IotHub                           
    Script 2.4.0       AzureRM.IotHub                           
    Script 2.1.0       AzureRM.IotHub                           
    Script 5.1.1       AzureRM.KeyVault                         
    Script 5.0.2       AzureRM.KeyVault                         
    Script 4.3.0       AzureRM.KeyVault                         
    Script 4.2.0       AzureRM.KeyVault                         
    Script 3.4.0       AzureRM.KeyVault                         
    Script 3.1.0       AzureRM.KeyVault                         
    Script 4.1.2       AzureRM.LogicApp                         
    Script 4.0.4       AzureRM.LogicApp                         
    Script 4.0.3       AzureRM.LogicApp                         
    Script 4.0.1       AzureRM.LogicApp                         
    Script 3.4.0       AzureRM.LogicApp                         
    Script 3.1.0       AzureRM.LogicApp                         
    Script 0.18.3      AzureRM.MachineLearning                  
    Script 0.18.0      AzureRM.MachineLearning                  
    Script 0.17.2      AzureRM.MachineLearning                  
    Script 0.17.0      AzureRM.MachineLearning                  
    Script 0.15.6      AzureRM.MachineLearning                  
    Script 0.15.0      AzureRM.MachineLearning                  
    Script 0.4.6       AzureRM.MachineLearningCompute           
    Script 0.4.3       AzureRM.MachineLearningCompute           
    Script 0.4.2       AzureRM.MachineLearningCompute           
    Script 0.4.0       AzureRM.MachineLearningCompute           
    Script 0.2.5       AzureRM.MarketplaceOrdering              
    Script 0.2.2       AzureRM.MarketplaceOrdering              
    Script 0.2.1       AzureRM.MarketplaceOrdering              
    Script 0.2.0       AzureRM.MarketplaceOrdering              
    Script 0.10.2      AzureRM.Media                            
    Script 0.10.0      AzureRM.Media                            
    Script 0.9.2       AzureRM.Media                            
    Script 0.9.0       AzureRM.Media                            
    Script 0.7.6       AzureRM.Media                            
    Script 0.7.0       AzureRM.Media                            
    Script 6.5.0       AzureRM.Network                          
    Script 6.2.0       AzureRM.Network                          
    Script 5.4.2       AzureRM.Network                          
    Script 5.3.0       AzureRM.Network                          
    Script 4.4.0       AzureRM.Network                          
    Script 4.1.0       AzureRM.Network                          
    Script 5.0.3       AzureRM.NotificationHubs                 
    Script 5.0.0       AzureRM.NotificationHubs                 
    Script 4.1.1       AzureRM.NotificationHubs                 
    Script 4.1.0       AzureRM.NotificationHubs                 
    Script 3.4.0       AzureRM.NotificationHubs                 
    Script 3.1.0       AzureRM.NotificationHubs                 
    Script 5.0.4       AzureRM.OperationalInsights              
    Script 5.0.1       AzureRM.OperationalInsights              
    Script 4.3.2       AzureRM.OperationalInsights              
    Script 4.3.0       AzureRM.OperationalInsights              
    Script 3.4.0       AzureRM.OperationalInsights              
    Script 3.1.0       AzureRM.OperationalInsights              
    Script 1.0.4       AzureRM.PolicyInsights                   
    Script 1.0.1       AzureRM.PolicyInsights                   
    Script 4.1.8       AzureRM.PowerBIEmbedded                  
    Script 4.1.5       AzureRM.PowerBIEmbedded                  
    Script 4.1.4       AzureRM.PowerBIEmbedded                  
    Script 4.1.2       AzureRM.PowerBIEmbedded                  
    Script 3.4.0       AzureRM.PowerBIEmbedded                  
    Script 3.1.0       AzureRM.PowerBIEmbedded                  
    Script 5.4.0       AzureRM.profile                          
    Script 5.3.0       AzureRM.profile                          
    Script 4.6.0       AzureRM.profile                          
    Script 4.4.0       AzureRM.profile                          
    Script 3.4.0       AzureRM.profile                          
    Script 3.1.0       AzureRM.profile                          
    Script 4.1.6       AzureRM.RecoveryServices                 
    Script 4.1.3       AzureRM.RecoveryServices                 
    Script 4.1.2       AzureRM.RecoveryServices                 
    Script 4.1.0       AzureRM.RecoveryServices                 
    Script 3.4.0       AzureRM.RecoveryServices                 
    Script 3.1.0       AzureRM.RecoveryServices                 
    Script 4.4.0       AzureRM.RecoveryServices.Backup          
    Script 4.2.0       AzureRM.RecoveryServices.Backup          
    Script 4.1.2       AzureRM.RecoveryServices.Backup          
    Script 4.1.0       AzureRM.RecoveryServices.Backup          
    Script 3.4.0       AzureRM.RecoveryServices.Backup          
    Script 3.1.0       AzureRM.RecoveryServices.Backup          
    Script 0.2.8       AzureRM.RecoveryServices.SiteRecovery    
    Script 0.2.5       AzureRM.RecoveryServices.SiteRecovery    
    Script 0.2.4       AzureRM.RecoveryServices.SiteRecovery    
    Script 0.2.2       AzureRM.RecoveryServices.SiteRecovery    
    Script 5.0.3       AzureRM.RedisCache                       
    Script 5.0.0       AzureRM.RedisCache                       
    Script 4.1.2       AzureRM.RedisCache                       
    Script 4.1.0       AzureRM.RedisCache                       
    Script 3.4.0       AzureRM.RedisCache                       
    Script 3.1.0       AzureRM.RedisCache                       
    Script 0.3.8       AzureRM.Relay                            
    Script 0.3.4       AzureRM.Relay                            
    Script 0.3.3       AzureRM.Relay                            
    Script 0.3.1       AzureRM.Relay                            
    Script 0.2.6       AzureRM.Relay                            
    Script 0.2.0       AzureRM.Relay                            
    Script 6.4.0       AzureRM.Resources                        
    Script 6.1.0       AzureRM.Resources                        
    Script 5.5.2       AzureRM.Resources                        
    Script 5.5.0       AzureRM.Resources                        
    Script 4.4.0       AzureRM.Resources                        
    Script 4.1.0       AzureRM.Resources                        
    Script 0.16.8      AzureRM.Scheduler                        
    Script 0.16.5      AzureRM.Scheduler                        
    Script 0.16.3      AzureRM.Scheduler                        
    Script 0.16.1      AzureRM.Scheduler                        
    Script 0.15.6      AzureRM.Scheduler                        
    Script 0.15.0      AzureRM.Scheduler                        
    Script 4.1.2       AzureRM.ServerManagement                 
    Script 4.1.0       AzureRM.ServerManagement                 
    Script 3.4.0       AzureRM.ServerManagement                 
    Script 3.1.0       AzureRM.ServerManagement                 
    Script 0.6.9       AzureRM.ServiceBus                       
    Script 0.6.5       AzureRM.ServiceBus                       
    Script 0.6.4       AzureRM.ServiceBus                       
    Script 0.6.2       AzureRM.ServiceBus                       
    Script 0.4.6       AzureRM.ServiceBus                       
    Script 0.4.0       AzureRM.ServiceBus                       
    Script 0.3.10      AzureRM.ServiceFabric                    
    Script 0.3.6       AzureRM.ServiceFabric                    
    Script 0.3.4       AzureRM.ServiceFabric                    
    Script 0.3.2       AzureRM.ServiceFabric                    
    Script 0.2.6       AzureRM.ServiceFabric                    
    Script 0.2.0       AzureRM.ServiceFabric                    
    Script 5.0.6       AzureRM.SiteRecovery                     
    Script 5.0.4       AzureRM.SiteRecovery                     
    Script 4.4.0       AzureRM.SiteRecovery                     
    Script 4.1.0       AzureRM.SiteRecovery                     
    Script 4.11.1      AzureRM.Sql                              
    Script 4.6.1       AzureRM.Sql                              
    Script 4.4.0       AzureRM.Sql                              
    Script 4.3.0       AzureRM.Sql                              
    Script 3.4.0       AzureRM.Sql                              
    Script 3.1.0       AzureRM.Sql                              
    Script 5.0.2       AzureRM.Storage                          
    Script 5.0.0       AzureRM.Storage                          
    Script 4.2.3       AzureRM.Storage                          
    Script 4.2.1       AzureRM.Storage                          
    Script 3.4.0       AzureRM.Storage                          
    Script 3.1.0       AzureRM.Storage                          
    Script 4.0.8       AzureRM.StreamAnalytics                  
    Script 4.0.5       AzureRM.StreamAnalytics                  
    Script 4.0.4       AzureRM.StreamAnalytics                  
    Script 4.0.2       AzureRM.StreamAnalytics                  
    Script 3.4.0       AzureRM.StreamAnalytics                  
    Script 3.1.0       AzureRM.StreamAnalytics                  
    Script 4.0.5       AzureRM.Tags                             
    Script 4.0.2       AzureRM.Tags                             
    Script 4.0.1       AzureRM.Tags                             
    Script 4.0.0       AzureRM.Tags                             
    Script 3.4.0       AzureRM.Tags                             
    Script 3.1.0       AzureRM.Tags                             
    Script 4.0.9       AzureRM.TrafficManager                   
    Script 4.0.6       AzureRM.TrafficManager                   
    Script 4.0.3       AzureRM.TrafficManager                   
    Script 4.0.1       AzureRM.TrafficManager                   
    Script 3.4.0       AzureRM.TrafficManager                   
    Script 3.1.0       AzureRM.TrafficManager                   
    Script 4.0.5       AzureRM.UsageAggregates                  
    Script 4.0.3       AzureRM.UsageAggregates                  
    Script 4.0.2       AzureRM.UsageAggregates                  
    Script 4.0.1       AzureRM.UsageAggregates                  
    Script 3.4.0       AzureRM.UsageAggregates                  
    Script 3.1.0       AzureRM.UsageAggregates                  
    Script 5.0.7       AzureRM.Websites                         
    Script 5.0.3       AzureRM.Websites                         
    Script 4.2.2       AzureRM.Websites                         
    Script 4.2.0       AzureRM.Websites                         
    Script 3.4.0       AzureRM.Websites                         
    Script 3.1.0       AzureRM.Websites                         
  Manifest 1.0.0.23    AzureRmStorageTable                      
  Manifest 1.0.0.16    AzureRmStorageTable                      
    Script 0.0.19      azure-security-center                    
    Script 1.0.1       AzureTools                               
    Script 0.5.2       CarbActiveDirectory                      
    Script 1.0.0.1     ChocolateyGet                            
  Manifest 1.0.0       CSVValidator                             
  Manifest 1.3.2       Docker                                   
    Script 1.0.0.5     DockerMsftProvider                       
    Script 1.0.0       Hosts                                    
    Script 5.0.1       ImportExcel                              
    Script 3.0.0       ImportExcel                              
    Script 1.12        Microsoft.ADAL.PowerShell                
  Manifest 1.1.0.0     Microsoft.PowerShell.Archive             
    Script 1.1.6.0     Microsoft.PowerShell.ODataUtils          
    Script 1.0.1       Microsoft.PowerShell.Operation.Validation
    Script 1.0.0.0     Microsoft.SME.CredSspPolicy              
    Script 0.1.5       MSOLTools                                
  Manifest 1.1.183.8   MSOnline                                 
  Manifest 1.1.166.0   MSOnline                                 
    Script 1.1.7.2     PackageManagement                        
    Script 1.1.6.0     PackageManagement                        
    Script 1.1.4.0     PackageManagement                        
    Binary 1.0.0.1     PackageManagement                        
    Script 4.3.1       Pester                                   
    Script 4.1.0       Pester                                   
    Script 3.4.0       Pester                                   
    Script 2.2.2       poshspec                                 
    Script 2.2.1       poshspec                                 
    Script 1.6.5       PowerShellGet                            
    Script 1.5.0.0     PowerShellGet                            
    Script 1.1.3.1     PowerShellGet                            
    Script 1.0.0.1     PowerShellGet                            
    Script 1.2         PSReadline                               
    Script 0.0         PSReadlineTheme                          
    Script 1.17.1      PSScriptAnalyzer                         
    Script 0.5.0       PSTools                                  
  Manifest 1.9.2.8     ReverseDSC                               
    Binary 0.8.1       SHiPS                                    
    Script 1.0         ShowPSAst                                
  Manifest 2.19.0.0    xActiveDirectory                         
  Manifest 2.18.0.0    xActiveDirectory                         
  Manifest 2.16.0.0    xActiveDirectory                         
  Manifest 4.1.0.0     xComputerManagement                      
  Manifest 3.1.0.0     xComputerManagement                      
  Manifest 2.0.0.0     xComputerManagement                      
  Manifest 3.12.0.0    xHyper-V                                 
  Manifest 3.9.0.0     xHyper-V                                 
  Manifest 5.7.0.0     xNetworking                              
  Manifest 5.3.0.0     xNetworking                              
  Manifest 5.0.0.0     xNetworking                              
  Manifest 0.4.0.0     xPendingReboot                           
  Manifest 0.3.0.0     xPendingReboot                           
  Manifest 1.1.0.0     xRemoteDesktopAdmin                      
  Manifest 3.4.0.0     xStorage                                 
  Manifest 2.0.0.0     xWebAdministration                       
  Manifest 1.17.0.0    xWebAdministration                       
  Manifest 1.0.0.0     ActiveDirectory                          
  Manifest 1.0.0.0     AppBackgroundTask                        
  Manifest 2.0.0.0     AppLocker                                
  Manifest 1.0.0.0     AppvClient                               
  Manifest 2.0.0.0     Appx                                     
    Script 1.0.0.0     AssignedAccess                           
  Manifest 1.0         BestPractices                            
  Manifest 1.0.0.0     BitLocker                                
  Manifest 2.0.0.0     BitsTransfer                             
  Manifest 1.0.0.0     BranchCache                              
  Manifest 1.0.0.0     CimCmdlets                               
  Manifest 1.0         ConfigCI                                 
  Manifest 1.0         Defender                                 
  Manifest 1.0.0.0     DeliveryOptimization                     
  Manifest 1.0.0.0     DirectAccessClientComponents             
    Script 3.0         Dism                                     
  Manifest 1.0.0.0     DnsClient                                
  Manifest 2.0.0.0     DnsServer                                
  Manifest 1.0.0.0     EventTracingManagement                   
  Manifest 1.0.0.0     GroupPolicy                              
  Manifest 1.0.0.0     HgsClient                                
  Manifest 1.0.0.0     HgsDiagnostics                           
    Binary 2.0.0.0     Hyper-V                                  
    Binary 1.1         Hyper-V                                  
  Manifest 2.0.0.0     International                            
  Manifest 1.0.0.0     iSCSI                                    
  Manifest 2.0.0.0     IscsiTarget                              
    Script 1.0.0.0     ISE                                      
  Manifest 1.0.0.0     Kds                                      
  Manifest 1.0.1.0     Microsoft.PowerShell.Archive             
  Manifest 3.0.0.0     Microsoft.PowerShell.Diagnostics         
  Manifest 3.0.0.0     Microsoft.PowerShell.Host                
  Manifest 1.0.0.0     Microsoft.PowerShell.LocalAccounts       
  Manifest 3.1.0.0     Microsoft.PowerShell.Management          
    Script 1.0         Microsoft.PowerShell.ODataUtils          
  Manifest 3.0.0.0     Microsoft.PowerShell.Security            
  Manifest 3.1.0.0     Microsoft.PowerShell.Utility             
  Manifest 3.0.0.0     Microsoft.WSMan.Management               
  Manifest 1.0         MMAgent                                  
  Manifest 1.0.0.0     MsDtc                                    
  Manifest 2.0.0.0     NetAdapter                               
  Manifest 1.0.0.0     NetConnection                            
  Manifest 1.0.0.0     NetEventPacketCapture                    
  Manifest 2.0.0.0     NetLbfo                                  
  Manifest 1.0.0.0     NetNat                                   
  Manifest 2.0.0.0     NetQos                                   
  Manifest 2.0.0.0     NetSecurity                              
  Manifest 1.0.0.0     NetSwitchTeam                            
  Manifest 1.0.0.0     NetTCPIP                                 
  Manifest 1.0.0.0     NetWNV                                   
  Manifest 1.0.0.0     NetworkConnectivityStatus                
  Manifest 1.0.0.0     NetworkSwitchManager                     
  Manifest 1.0.0.0     NetworkTransition                        
  Manifest 1.0         NFS                                      
  Manifest 1.0.0.0     PcsvDevice                               
  Manifest 1.0.0.0     PKI                                      
  Manifest 1.0.0.0     PnpDevice                                
  Manifest 1.1         PrintManagement                          
    Script 3.0         Provisioning                             
  Manifest 1.1         PSDesiredStateConfiguration              
    Script 1.0.0.0     PSDiagnostics                            
    Binary 1.1.0.0     PSScheduledJob                           
  Manifest 2.0.0.0     PSWorkflow                               
  Manifest 1.0.0.0     PSWorkflowUtility                        
  Manifest 3.0.0.0     RemoteAccess                             
  Manifest 2.0.0.0     RemoteDesktop                            
  Manifest 1.0.0.0     ScheduledTasks                           
  Manifest 2.0.0.0     SecureBoot                               
    Script 2.0.0.0     ServerManager                            
       Cim 1.0.0.0     ServerManagerTasks                       
  Manifest 1.0.0.0     ShieldedVMDataFile                       
  Manifest 1.0.0.0     ShieldedVMTemplate                       
  Manifest 2.0.0.0     SmbShare                                 
  Manifest 2.0.0.0     SmbWitness                               
  Manifest 1.0.0.0     StartLayout                              
  Manifest 2.0.0.0     Storage                                  
  Manifest 2.0.0.0     TLS                                      
  Manifest 1.0.0.0     TroubleshootingPack                      
  Manifest 2.0.0.0     TrustedPlatformModule                    
    Binary 2.1.639.0   UEV                                      
  Manifest 2.0.0.0     UpdateServices                           
  Manifest 2.0.0.0     VpnClient                                
  Manifest 1.0.0.0     Wdac                                     
  Manifest 1.0.0.0     WindowsDeveloperLicense                  
    Script 1.0         WindowsErrorReporting                    
  Manifest 1.0.0.0     WindowsSearch                            
  Manifest 1.0.0.0     WindowsUpdate                            
    Binary 16.0.7115.0 Microsoft.Online.SharePoint.PowerShell   
  Manifest 7.0.0.0     LyncOnlineConnector                      
    Script 7.0.0.0     SkypeOnlineConnector                     
    Binary 2.0.0.0     MSOnlineBackup                           

Environment Data

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.15063.1292
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15063.1292
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Debug Output

PS ProjectScripts:\azure\tests> $DebugPreference='Continue'
PS ProjectScripts:\azure\tests> get-AzKeyVault
DEBUG: 10:42:06 AM - GetAzureKeyVault begin processing with ParameterSet 'ListAllVaultsInSubscription'.
DEBUG: 10:42:06 AM - using account id '<username>@<domain>.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: '<username>@<domain>.com', environment: 'AzureCloud', tenant: '<tenantId>'
get-AzKeyVault : Method 'get_SerializationSettings' in type 'Microsoft.Azure.Management.KeyVault.KeyVaultManagementClient' from assembly 'Microsoft.Azure.Management.KeyVault, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
At line:1 char:1
+ get-AzKeyVault
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzKeyVault], TypeLoadException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.KeyVault.GetAzureKeyVault

DEBUG: AzureQoSEvent: CommandName - Get-AzKeyVault; IsSuccess - False; Duration - 00:00:00.3469046; Exception - System.TypeLoadException: Method
'get_SerializationSettings' in type 'Microsoft.Azure.Management.KeyVault.KeyVaultManagementClient' from assembly 'Microsoft.Azure.Management.KeyVault,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
   at Microsoft.Azure.Commands.KeyVault.Models.VaultManagementClient..ctor(IAzureContext context)
   at Microsoft.Azure.Commands.KeyVault.KeyVaultManagementCmdletBase.get_KeyVaultManagementClient()
   at Microsoft.Azure.Commands.KeyVault.KeyVaultManagementCmdletBase.ListVaults(String resourceGroupName, Hashtable tag)
   at Microsoft.Azure.Commands.KeyVault.GetAzureKeyVault.ExecuteCmdlet()
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 10:42:08 AM - GetAzureKeyVault end processing.
DEBUG: 10:42:08 AM - GetAzureKeyVault end processing.
MiYanni commented 6 years ago

@glaisne Az does not support side-by-side loading with AzureRM (it may cause unintended side-effects). Can you please remove all AzureRM modules and try again? Additionally, if it still fails, can you try installing PowerShell Core and let us know if the issue persists within PowerShell Core?

glaisne commented 6 years ago

Installing PSCore and installing AZ module resolved the issue. As a note, I did not uninstall AzureRM and my Core install does not see the AzureRM module (for some reason).

Thanks

MiYanni commented 6 years ago

Closing since issue has been worked-around.

Rajkishore123 commented 4 years ago

I also got a similar type of issue. Try the below URL, if it helps

https://azurelessons.com/method-get_serializationsettings-error-when-login-azurermaccount/