There’s been lots of posts about this in the past by various people so here’s my contribution.
Below is a screenshot of the steps I take.
You can see that I have powershellget installed as part of PowerShell but I don’t, yet, have the Azure module downloaded or installed so I Get that module and then I install that module.
I have had to force it to install alongside the one that’s already on my machine. When I run the Get-Module command, I still don’t “see” the Azure model and so I must import it at which point it is then available for use.
Once the module has been downloaded, installed and imported (the three steps that need to be performed when connecting for the first time) I can them move on to making a connection to Azure.
NOTE: Once the Azure module has been downloaded and installed, it only needs to be imported for future connections just like any other PowerShell module on your computer.
To connect in, I enter the “Login-AzureRMAccount” command which pops up the “modern” logon dialog box.
After being successfully authenticated, my subscription details are played back to me and I can then manage Azure from the command line.
Of course, the much easier way is to simply download the MSI installer from the Azure web site (https://azure.microsoft.com/en-gb/downloads/) under the command line tools section ;>)
Hope this helps you out.