How To Use Azure CLI In PowerShell

Do you know you can use Azure CLI In PowerShell from your PowerShell ISE from Windows PowerShell ISE itself? In this article, let me walk you through all those steps to do this.

How To Use Azure CLI In PowerShell

To use Azure CLI in PowerShell, follow the steps below.

1. The first step is you need to ensure that you have already installed Azure CLI on your local machine. You can install Azure CLI now if you have not yet installed it.

2. Now, open Windows PowerShell ISE with Run as administrator mode.

how to use azure cli commands in powershell

3. Now, we can verify if Azure CLI is installed using the Azure CLI command below.

az --version

After executing the above command, I got the expected output, as shown below. The Azure CLI version I installed was 2.67.0.

How To Use Azure CLI In PowerShell

4. Now, we can execute the Az login command and enter the Azure credentials to authenticate with your Azure account.

az login

5. Once authenticated, we can use any Azure CLI command to do any transaction.

az storage account list

After executing the above command, I got the expected output, as shown in the screenshot below.

use azure cli in powershell

Conclusion

Using the steps mentioned in this article, it is so easy to use Azure CLI in PowerShell.

You may also like following the articles below.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!