Reputation: 359
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 '[email protected]' -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.
Upvotes: 2
Views: 3374
Reputation: 8717
There was a breaking change in the 4.x release of the Azure PowerShell cmdlets, the short term fix is to roll back to 3.8.
If you used "Install-Module AzureRM" to install the cmdlets, then uninstall and re-install with the -RequiredVersion parameter, e.g.
Install-Module AzureRM -RequiredVersion 3.8.0 -Force -AllowClobber
If you installed the cmdlets via WebPI/MSI/AzureSDK install, then uninstall Azure PowerShell from control panel and install the 3.8 version from here: https://github.com/Azure/azure-powershell/releases/download/v3.8.0-April2017/azure-powershell.3.8.0.msi
We're working on a fix for 4.x...
Upvotes: 4