Master Azure Development: Linking Cloud Shell with VS Code on Windows Made Easy

INTRODUCTION

If you are using Azure Cloud Shell and wish to combine it with VS Code on Windows, you may run into problems where the az command is not recognized in the Visual Studio Code (VS Code) terminal. Here’s how to fix this problem ste…


This content originally appeared on DEV Community and was authored by Oluwatobiloba Akinbobola

INTRODUCTION

If you are using Azure Cloud Shell and wish to combine it with VS Code on Windows, you may run into problems where the az command is not recognized in the Visual Studio Code (VS Code) terminal. Here's how to fix this problem step-by-step.
Step 1: Install Azure CLI

  1. Download the Azure CLI ZIP file from the official Azure CLI Releases page.
  2. Extract the ZIP file to a directory, e.g., C:\Users\<YourUsername>\AzureCLI.

Step 2: Add Azure CLI to PATH
To make the az command available in your terminal, you need to add the Azure CLI bin directory to your system's PATH.

Temporary Solution (Current Session Only)

  1. Open the terminal in VS Code (Ctrl+`).
  2. Run the following command to temporarily add the Azure CLI path to the PATH variable: $env:Path += ";C:\Users\<YourUsername>\AzureCLI\bin"
  3. Test the az command: az --version

Terminal Image

Permanent Solution

  1. Open PowerShell.
  2. Run the following command to add the Azure CLI path to your user PATH permanently: [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Users\<YourUsername>\AzureCLI\bin", "User")
  3. Restart VS Code and test the az command: az --version

Step 3: Verify the PATH in VS Code

  1. Open the integrated terminal in VS Code (Ctrl+`).
  2. Run the following command to check the PATH variable: $env:Path Ensure C:\Users\<YourUsername>\AzureCLI\bin is included.

Step 4: Troubleshooting
If the az command still doesn’t work:

  1. Ensure the bin folder contains the az.cmd or az.exe file.
  2. Restart your computer to apply all changes.
  3. Consider using the Azure CLI MSI installer for a hassle-free installation: Install Azure CLI.

CONCLUSTION

You can use the az command with ease and successfully link Azure Cloud Shell with Visual Studio Code on Windows by following these steps. This article guarantees that you can effectively manage your Azure resources from within Visual Studio Code, regardless of whether you opt for a temporary or permanent solution.


This content originally appeared on DEV Community and was authored by Oluwatobiloba Akinbobola


Print Share Comment Cite Upload Translate Updates
APA

Oluwatobiloba Akinbobola | Sciencx (2025-01-13T22:05:17+00:00) Master Azure Development: Linking Cloud Shell with VS Code on Windows Made Easy. Retrieved from https://www.scien.cx/2025/01/13/master-azure-development-linking-cloud-shell-with-vs-code-on-windows-made-easy/

MLA
" » Master Azure Development: Linking Cloud Shell with VS Code on Windows Made Easy." Oluwatobiloba Akinbobola | Sciencx - Monday January 13, 2025, https://www.scien.cx/2025/01/13/master-azure-development-linking-cloud-shell-with-vs-code-on-windows-made-easy/
HARVARD
Oluwatobiloba Akinbobola | Sciencx Monday January 13, 2025 » Master Azure Development: Linking Cloud Shell with VS Code on Windows Made Easy., viewed ,<https://www.scien.cx/2025/01/13/master-azure-development-linking-cloud-shell-with-vs-code-on-windows-made-easy/>
VANCOUVER
Oluwatobiloba Akinbobola | Sciencx - » Master Azure Development: Linking Cloud Shell with VS Code on Windows Made Easy. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/13/master-azure-development-linking-cloud-shell-with-vs-code-on-windows-made-easy/
CHICAGO
" » Master Azure Development: Linking Cloud Shell with VS Code on Windows Made Easy." Oluwatobiloba Akinbobola | Sciencx - Accessed . https://www.scien.cx/2025/01/13/master-azure-development-linking-cloud-shell-with-vs-code-on-windows-made-easy/
IEEE
" » Master Azure Development: Linking Cloud Shell with VS Code on Windows Made Easy." Oluwatobiloba Akinbobola | Sciencx [Online]. Available: https://www.scien.cx/2025/01/13/master-azure-development-linking-cloud-shell-with-vs-code-on-windows-made-easy/. [Accessed: ]
rf:citation
» Master Azure Development: Linking Cloud Shell with VS Code on Windows Made Easy | Oluwatobiloba Akinbobola | Sciencx | https://www.scien.cx/2025/01/13/master-azure-development-linking-cloud-shell-with-vs-code-on-windows-made-easy/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.