2

I am trying to create an Azure Resource Group project using Visual Studio 2015 by following this tutorial. But when I deploy, it turns out a weird error:

[ERROR] Add-AzureRmAccount : A parameter cannot be found that matches parameter name 
[ERROR] 'EnvironmentName'.
[ERROR] At line:1 char:2379
[ERROR] + ... xmg' -AccountId 'myemail@outlook.com' -EnvironmentName 'AzureC ...
[ERROR] +                                                  ~~~~~~~~~~~~~~~~
[ERROR]     + CategoryInfo          : InvalidArgument: (:) [Add-AzureRmAccount], Param 
[ERROR]    eterBindingException
[ERROR]     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands. 
[ERROR]    Profile.AddAzureRMAccountCommand
[ERROR]  
[ERROR] Run Login-AzureRmAccount to login.

I updated the latest version of Azure SDK but still the same error. Please help me to resolve this issue.

4

1 回答 1

4

Azure PowerShell cmdlet 的 4.x 版本发生了重大变化,短期修复是回滚到 3.8。

如果您使用“Install-Module AzureRM”安装 cmdlet,则使用 -RequiredVersion 参数卸载并重新安装,例如

Install-Module AzureRM -RequiredVersion 3.8.0 -Force -AllowClobber

如果您通过 WebPI/MSI/AzureSDK install 安装了 cmdlet,则从控制面板卸载 Azure PowerShell 并从此处安装 3.8 版本:https ://github.com/Azure/azure-powershell/releases/download/v3.8.0- April2017/azure-powershell.3.8.0.msi

我们正在修复 4.x...

于 2017-05-18T16:37:43.573 回答