I am using PowerShell for some work in Azure. I am trying to run this code, but I get an error saying:
'Unable to find type [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider].'
$context = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile.DefaultContext
I tried everything to fix it I searched for the DLL file I need, but to no avail. I tried to add the type using this command:
add-type -assemblyname Microsoft.Azure.Common
But that also gives an error. I am also using the latest version of PowerShell:
Name | Value |
---|---|
PSVersion | 5.1.18362.1171 |
PSEdition | Desktop |
PSCompatibleVersions | {1.0, 2.0, 3.0, 4.0...} |
BuildVersion | 10.0.18362.1171 |
CLRVersion | 4.0.30319.42000 |
WSManStackVersion | 3.0 |
PSRemotingProtocolVersion | 2.3 |
SerializationVersion | 1.1.0.1 |
Please help!