I want to create a new resource group in azure via power shell with the command:
New-AzureRmResourceGroup - Name name -Location "WesternEurope"
then I get the error message:
New-AzureRmResourceGroup : Run Login-AzureRmAccount to login."
But I am already logged in with "Login-AzureRmAccount" and entered my Azure credentials.
I got it. In this page, there are two commands to install azure modules for powershell. https://azure.microsoft.com/en-gb/documentation/articles/powershell-install-configure/
Install the Azure Resource Manager modules from the PowerShell Gallery
Install-Module AzureRM
Install the Azure Service Management module from the PowerShell Gallery
Install-Module Azure
With the AzureRm modules it worked.
It might be unrelated, but WesternEurope is not a valid value for Location. Either WestEurope or "West Europe" would do.
It seems far-fetched, but does that make a difference?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.