gpt4 book ai didi

powershell - 乌类图 : 'Login-AzureRmAccount' is not recognized as the name of a cmdlet

转载 作者:行者123 更新时间:2023-12-04 18:55:59 32 4
gpt4 key购买 nike

我已经在我的 Ubuntu 机器上安装了 Powershell。当我在 PowerShell 中输入 Login-AzureRmAccount 时,出现如下错误:

PS> 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

当我输入Get-Module -ListAvailable -Name Azure -Refresh时,我没有得到任何结果。

PowerShell 版本:

powershell -version
powershell v6.0.0-alpha.17

如何解决上述错误?

最佳答案

您需要先安装Azure PowerShell模块:

#Azure RM NetCore Preview Module Install
powershell Install-Module AzureRM.NetCore.Preview
powershell Import-Module AzureRM.NetCore.Preview

这是我的测试。

root@shui:/home# powershell 
PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS /home> Login-AzureRmAccount
VERBOSE: To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code F2RKUXRNE to authenticate.

更多信息请引用此link .

关于powershell - 乌类图 : 'Login-AzureRmAccount' is not recognized as the name of a cmdlet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43177694/

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