简体   繁体   English

PowerShell Azure Cmdlet无法识别

[英]PowerShell Azure Cmdlet not Recognized

Running PowerShell ISE (V4), I install the AzureRM module as follows 运行PowerShell ISE(V4),我按如下方式安装AzureRM模块

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 然后我尝试使用登录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 我还设置了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 我升级到Windows Management Framework 5,现在我可以运行命令Login-AzureRMAccount

Also we can download the Azure PowerShell installation file and install it. 我们还可以下载Azure PowerShell安装文件并进行安装。 We can download the PS version 3.3.0 installation file from this page: 我们可以从这个页面下载PS版本3.3.0安装文件:

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

Login-AzureRmAccount is simply an alias for Add-AzureRmAccount which is used to access the ARM resources in your Azure account. Login-AzureRmAccount只是Add-AzureRmAccount的别名,用于访问Azure帐户中的ARM资源。

Add-AzureAccount is used to access the "classic" resources in your Azure account. Add-AzureAccount用于访问Azure帐户中的“经典”资源。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure PowerShell - Invoke-AzContainerInstanceCommand - 术语“进程”未被识别为 cmdlet 的名称 - Azure PowerShell - Invoke-AzContainerInstanceCommand - The term 'processÂ' is not recognized as the name of a cmdlet Azure函数-PowerShell,安装az cmdlet ::不将术语“ az”识别为cmdlet的名称 - Azure Function - PowerShell, installing az cmdlet :: The term 'az' is not recognized as the name of a cmdlet Powershell - 术语“=”未被识别为 cmdlet 的名称 - Powershell - The term '=' is not recognized as the name of a cmdlet Azure PowerShell cmdlet转换为字符串 - Azure PowerShell cmdlet into Strings 在Azure DevOps Pipeline中的Azure Powershell步骤中引发“错误'***'未被识别为cmdlet的名称”错误 - “The term '***' is not recognized as the name of a cmdlet” error thrown in Azure Powershell step in Azure DevOps Pipeline 在Azure门户测试窗格(自动化帐户)上无法识别Azure资源管理器Powershell cmdlet - Azure Resource Manager powershell cmdlet is not recognized on azure portal test pane (Automation accounts) Powershell Azure:术语“Get-AutomationConnection”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称 - Powershell Azure : The term 'Get-AutomationConnection' is not recognized as the name of a cmdlet, function, script file, or operable program Azure powershell中无法识别“azure” - “azure” not recognized in Azure powershell 无法将Powershell Test-Path识别为cmdlet - powershell Test-Path is not recognized as a cmdlet PowerShell,术语“xxxxxx”未被识别为 cmdlet 的名称 - PowerShell, The term 'xxxxxx' is not recognized as the name of a cmdlet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM