Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'Get-AzSKAzureServicesSecurityStatus' command was found in the module 'AzSK', but the module could not be loaded. #125

Closed
rajcheval opened this issue Oct 2, 2018 · 3 comments

Comments

@rajcheval
Copy link

I just install DevOps Tools kit on Windows 10.

PS C:\work\azsk> $PSVersionTable

Name Value


PSVersion 5.1.17134.228
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.228
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

PS C:\work> cd .\azsk
PS C:\work\azsk> Get-AzSKAzureServicesSecurityStatus -subscriptionId xxxxxxxx
Get-AzSKAzureServicesSecurityStatus : The 'Get-AzSKAzureServicesSecurityStatus' command was found in the module
'AzSK', but the module could not be loaded. For more information, run 'Import-Module AzSK'.
At line:1 char:1

  • Get-AzSKAzureServicesSecurityStatus -subscriptionId xxxxxxxx ...
  •   + CategoryInfo          : ObjectNotFound: (Get-AzSKAzureServicesSecurityStatus:String) [], CommandNotFoundExceptio
     n
      + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
    
    

PS C:\work\azsk> Import-Module AzSK
Import-Module : The following error occurred while loading the extended type data file: Error in TypeData
"Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer": The TypeConverter was ignored
because it already occurs.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer": The member
SerializationDepth is already present.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache": The member
PropertySerializationSet is already present.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache": The member
SerializationMethod is already present.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache": The member
PropertySerializationSet is already present.
Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache": The member
SerializationMethod is already present.
Error in TypeData "Microsoft.Azure.Commands.Profile.Models.PSAzureContext": The member SerializationDepth is already
present.
Error in TypeData "Microsoft.Azure.Commands.Profile.Models.PSAzureProfile": The member SerializationDepth is already
present.
At line:1 char:1

  • Import-Module AzSK
  •   + CategoryInfo          : InvalidOperation: (:) [Import-Module], RuntimeException
      + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

PS C:\work\azsk> $env:PSModulePath
C:\Users\rajin\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

@VishalHaibatpure
Copy link

This generally happens when multiple AzureRM modules present. Please check if this FAQ helps you.

@rajcheval
Copy link
Author

Thanks @VishalHaibatpure yesterday I ran import-module command and it had failed. Today I opened a new powershell command windows and ran import-module. It finished successfully. I was able to run a security scan.

@rajcheval
Copy link
Author

This issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants