NOTE: This post is now out of date. To view the latest scripts for installing PowerShell Core, please check out my most recent PowerShell Core blog post.
I wrote a on Ubuntu 14.04, 16.04, and Mac OS X 10.11.6 if you want to check it out since this post will focus mainly on how to install the AzureRM modules and use them to manage your Azure subscription. If you do not currently have an Azure subscription and are interested in playing around with it, you can sign up and get a $200 credit with a 30 day free trial!
# Install PowerShell sudo snap install powershell-preview --classic # Start PowerShell pwsh-preview After installing Snap will automatically upgrade, but you can trigger an upgrade using sudo snap refresh powershell or sudo snap refresh powershell-preview.
From here on down, I will assume you have PowerShell installed on your Ubuntu 14.04, 16.04, and/or OS X 10.11.6 machine. As of the time of this writing you may have noticed that you cannot use the 'Install-Module AzureRM' command as you will receive errors. This is partially due to, which is currently being tracked and can be followed at the provided link.
Also, there are new Modules, AzureRM.NetCore.Preview, AzureRM.Profile.NetCore.Preview, and AzureRM.Resources.NetCore.Preview, created for PowerShell Core, so the workaround to install will be: Install-Package -Name AzureRM.NetCore.Preview -Source -ProviderName NuGet -ExcludeVersion -Destination You can see a demo using these modules. Note: The above Install-Package command is an old method. You can now use the Install-Module AzureRM.NetCore.Preview command as found in the install scripts in.
You can select a folder of your choosing, or use one of the following: - /Users/username/.local/share/powershell/Modules (OS X 10.11.6) - /usr/local/microsoft/powershell/6.0.0-alpha.9/Modules (OS X 10.11.6) - /home/username/.local/share/powershell/Modules (Ubuntu 14.04 and 16.04) - /opt/microsoft/powershell/6.0.0-alpha.9/Modules (Ubuntu 14.04 and 16.04) - /usr/local/share/powershell/Modules (Ubuntu and OS X) NOTE: If you select a folder other than one listed above, you will need to update the $ENV:PSMODULEPATH with the location you select. To add locations to the $ENV:PSMODULEPATH use the following command: NOTE: If you simply type the following command at the command line, this will only be a temporary value. To add a permanent one, you will want to add the command to your user profile (/.config/powershell/profile.ps1) or default profile ($PSHOME/profile.ps1). $env:PSModulePath = $env:PSModulePath + ':path-goes-here' For Mac OS X 10.11.6 users specifically, as mentioned in and the PowerShell package for OS X is missing.NET Core pre-requisite components. This known and reported issue impacts some of the PowerShell cmdlets, including a lack of PowerShell Package Providers by default, and other commands such as Invoke-RestMethod as mentioned in. With that in mind, the workaround at the time of this writing is to install.
![Powershell on mac os Powershell on mac os](/uploads/1/2/5/4/125499613/602557281.png)
![Powershell Powershell](/uploads/1/2/5/4/125499613/553772227.png)
Until you do so, the Install-Package command will not work on OS X 10.11.6 El Capitan. After you run the above command, you then will type: Import-Module AzureRM.NetCore.Preview The above command will then import the module into your PowerShell environment so you can begin to use AzureRM commands. After the import completes, you can test your newly installed and imported module by typing: Login-AzureRMAccount The above should then prompt you to head on over to to enter the provided code. Feel free to comment below with any questions / feedback.