Amit Joshi
Amit Joshi

Reputation: 61

Connect-AzureRMAccount : The term 'Connect-AzureRMAccount' is not recognized as the name of a cmdlet, function, script file, or operable program

I am stuck in a problem in Azure PowerShell. I am not able to connect to AzureRM account. It's showing this error:

Connect-AzureRMAccount : The term 'Connect-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 + Connect-AzureRMAccount + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Connect-AzureRMAccount:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

I'm doing this in Mac OS . Firstly I've installed the PowerShell using: brew cask install PowerShell. Then I've done the following:

  1. Install-Module AzureRM -AllowClobber -Scope CurrentUser.
  2. Install-Module Azure.
  3. Install-Module AzureRM.
  4. Import-Module AzureRM.
  5. Connect-AzureRMAccount (It's Showing me the above Error).

I am expecting step 5 to give me the sign in pop up. Please Help

Upvotes: 3

Views: 19346

Answers (1)

Dustin
Dustin

Reputation: 326

The AzureRM module isn't available on macOS. You will need the Az module. It has tons of parity and an option for enabling compatible aliases (Enable-AzureRmAlias): https://azure.microsoft.com/en-us/blog/azure-powershell-cross-platform-az-module-replacing-azurerm/

Keep in mind that this module is the future, in general (Windows, macOS, and Linux... as well in Azure Cloud Shell).

The following cmdlets are useful:

Install-Module -Name Az -AllowClobber
Import-Module Az
Connect-AzAccount

Upvotes: 10

Related Questions