Connect To Azure Resource Manager Using PowerShell

I’ve been working on Azure for a few months now. There are ways to get into the ARM portal, however, I thought to connect to it using PowerShell. In this article, you will find the steps to connect with that using simple PowerShell cmdlets.

PowerShell gives a set of cmdlets (commands) that you can use on the Azure Resource Manager (ARM Portal) to manage Azure resources. There is an icon in the ARM where you can see Azure Cloud Shell.

Apart from this, you can also download and install it on your local machine and use it in any PowerShell session.

Please refer to the below screen for reference which is Windows 10 in-built.


Need help with PowerShell?

If you are unfamiliar with PowerShell, you may find an introduction to PowerShell helpful.

You can also watch this video: PowerShell Basics: (Part 1) Getting Started with PowerShell.

Or attend the Microsoft Virtual Academy Getting Started with PowerShell Jumpstart.

How to Connect

The simplest way to get started is to launch Cloud Shell.

Login to Azure Resource Manager with the credentials. On the top in the right side, you will have Cloud Shell icon as depicted below in the screenshot.

  1. Click on the icon to launch Cloud Shell from the top navigation of the Azure Resource Manager portal.


  2. It may ask for the subscription in order to create a storage account, as shown in the depicted image below.


Once you're done with the installation of storage, the Cloud Shell will appear in the browser at the bottom of the screen.


You can also install Azure PowerShell and use it locally in a PowerShell session.

The following samples can help you learn how to perform common scenarios with Azure PowerShell.

Step 1

Go to start and right click. You will get the following window. Click on Windows PowerShell (admin).


Step 2

As soon as you click on that, you will have the following window.


Just paste the following cmdlets to proceed further.


Step 3

Fill the required details in order to connect with Azure Resource Manager(ARM) portal.


After completing the above process, the following window will appear with SubscriptionName, SubscriptionID, and other details.



This is how you can easily use PowerShell to connect to the Azure portal.

Stay tuned for my next article where we will see how to create a Virtual Machine using PowerShell.