yannis assael | the blog

  • Home
  • About
  • Categories
    • Android
    • Computing
    • iOS
    • Machine Learning
    • MacOSX
  • GitHub
  • Mobile Apps
  • yannisassael.com


AzureRM PowerShell Mac OS X

Written by iassael on 10/02/2017. Posted in computing, macosx

I recently had to install Powershell on my Mac (sigh) (bigger sigh) and I run into issues by trying to get AzureRM to work. Among others:

Login-AzureRmAccount : The ‘Login-AzureRmAccount’ command was found in the module ‘AzureRM.profile’, but the module could not be loaded. For more information, run ‘Import-Module
AzureRM.profile’.
At /Users/iassael/Drive/Code/projects/azure/BulkAddAAD.ps1:5 char:1
+ Login-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Login-AzureRmAccount:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Everything can be resolved by installing AzureRM from here:

Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2/ -ProviderName NuGet -ExcludeVersion -Destination $home/powershell/modules
Import-Module $home/powershell/modules/AzureRM.Profile.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.Resources.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.NetCore.Preview
Login-AzureRmAccount

PS. Import-Module would have to be rerun every time powershell is restarted.

Trackback from your site.

Leave a comment