How To Use Azure CLI In Visual Studio Code

Do we know you can use Azure CLI in Visual Studio Code ? In this article, I will walk you through all the steps to achieve this.

How To Use Azure CLI In Visual Studio Code

Before starting, you should know the prerequisites needed here.

Prerequisites

1. You must install Azure CLI on your system.

2. You must have an Azure account or subscription. If you haven’t till now, you can create an Azure free account now.

To use Azure CLI in Visual Studio Code, follow the steps below.

1. First, you must download and install it on your Windows machine.

2. Open Visual Studio Code and click on the extensions button from the left navigation. Alternatively, you can press Ctrl+Shift+X on your keyboard, as shown below.

use azure cli in visual studio code

3. Search for Azure CLI Tools and click on the Install button on the search result Azure CLI tools, as shown in the screenshot below.

How To Use Azure CLI In Visual Studio Code
azure cli in visual studio code

4. Now, click on the Terminal menu and then select the New Terminal option as shown in the screenshot below.

use azure cli in visual studio code

5. Now, we can execute the az login PowerShell command to connect to Azure.

az login

After executing the command, you will be prompted to enter your Azure credentials, as shown in the screenshot below.

run azure cli commands in visual studio code

Conclusion

To use Azure CLI in Visual Studio Code, we must have an Azure account, and you must install Azure CLI on your system before starting. The above information can help you achieve this.

You may also like the following articles.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

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