gpt4 book ai didi

PowerShell Azure Cmdlet 无法识别

转载 作者:行者123 更新时间:2023-12-04 02:20:45 25 4
gpt4 key购买 nike

运行PowerShell ISE(V4),我按如下方式安装AzureRM模块

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

最佳答案

I upgraded to Windows Management Framework 5 and I can now run the command Login-AzureRMAccount

我们还可以下载 Azure PowerShell 安装文件并安装它。我们可以从这个页面下载PS版本3.3.0安装文件:

https://github.com/Azure/azure-powershell/releases/tag/v3.3.0-December2016

关于PowerShell Azure Cmdlet 无法识别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42089632/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com