Running PowerShell ISE (V4), I install the AzureRM module as follows
Import-Module AzureRM
I then check the version
(get-module azurerm).Version
which returns
Major Minor Build Revision
3 4 0 -1
I then attempt to use the login cmdlet
Login-AzureRmAccount
but get the error
Login-AzureRmAccount : The term 'Login-AzureRmAccount' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Login-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Login-AzureRmAccount:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
What am I doing wrong?
NOTE I'm working behind a proxy and have used the following command to get round it
[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
I've also set the PSGallery repo as follows
Register-PSRepository -Name "PSGallery" -SourceLocation "https://www.powershellgallery.com/api/v2/" -InstallationPolicy Trusted
Install-Module AzureRm
I get the errorNo match was found for the specified search criteria and module name AzureRm
. Similar to this. Will try installingPowerShellGet
again.Get-Module -ListAvailable -Name Azure* -Refresh
. Do I need toInstall-Module Azure
as well asInstall-Module AzureRM
? I thought former was just for ASM.