Powershell from PC to your Azure Tenancy

The journey to AZ 104 has begun, my trial account is about to expire and about to move into a pay-as-you-go account and I would need to have some conversation with my wife regarding possible charges on the credit card as I do my labs. Moving from learning Cisco (routing and switching) to Microsoft Cloud has some mind shifts involved but if there’s one thing I am glad is that the use of CLI or in Microsoft’s case Powershell.

As part of the requirement in learning Azure, I have to learn Powershell commands. No problem except there’s just new commands I have to familiarise myself with. There are no auto-complete capability (sad) so would just have to live with it. So in this blog will be sharing out to use powershell to connect your PC to your Azure tenancy so you don’t have to click the cloud azure icon whenever you need to access powershell to run a cmdlet.

Step 1:

Make sure your device runs at least version 4 and you can find out by typing the following commend:

My PC was running at version 5 so no issues with that one.

Step 2:

Install the powershell module to allow you to connect to your tenancy by typing Install-Module AzureRM. In my case, since I don’t have full admin rights on my laptop I had to add the scope command as you can see from the screenshot below. Once that is done, you should be all set for the module to install.

Click either Y or A to agree on the installation from the repository.

Step 3:

You can then go ahead and start importing the module and connect to your Azure account.

Step 4:

By the way, before you can see the account information in powershell you’ll be asked to enter your credentials.

Step 5:

To make this account persistent the next time you log it. You can enable the context autosave feature.

Step 6:

Once you are logged in, you can start running powershell cmdlets to your Azure tenancy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s