运行所PowerShell ISE中(V4),我安装AzureRM模块如下PowerShell的天青Cmdlet的未认可
Import-Module AzureRM
然后我检查版本
(get-module azurerm).Version
返回
Major Minor Build Revision
3 4 0 -1
然后我尝试使用登录cmdlet
Login-AzureRmAccount
,但得到的错误
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
我在做什么错?
注意 我的工作背后的代理,并已经使用下面的命令来避开它
[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
我还设置了PSGallery回购如下
Register-PSRepository -Name "PSGallery" -SourceLocation "https://www.powershellgallery.com/api/v2/" -InstallationPolicy Trusted
尝试重新安装整个模块? – 4c74356b41
现在,在尝试“Install-Module AzureRm”时,出现错误“找不到指定搜索条件和模块名称AzureRm”的匹配项。与[this]类似(https://github.com/PowerShell/PowerShell/issues/1874)。将尝试再次安装'PowerShellGet'。 –
没有。 Windows 8.1。我在一个代理的后面工作 - 不知道这是否导致我以前的评论中的错误。奇怪虽然我可以列出所有的Azure模块,但似乎无法使用它们。 –