To open the Azure CLI in Windows 11, the most common method is to launch a command-line terminal and type az
.
Once the Azure CLI is installed on your Windows 11 machine, its executable (az.cmd
or az.exe
) is typically added to your system's environment variables (specifically, the PATH variable). This allows you to run the az
command from any terminal window, regardless of the current directory you are in.
Here are the common ways to open a terminal in Windows 11 to access the Azure CLI:
- Using Windows Terminal:
- Click the Start button or press the Windows key.
- Type "Windows Terminal" in the search bar.
- Click on the Windows Terminal app to open it.
- In the terminal window, type
az
and press Enter. This will launch the Azure CLI and display its command structure and options.
- Using Command Prompt:
- Click the Start button or press the Windows key.
- Type "cmd" or "Command Prompt" in the search bar.
- Click on the Command Prompt app.
- Type
az
and press Enter.
- Using PowerShell:
- Click the Start button or press the Windows key.
- Type "PowerShell" in the search bar.
- Click on the Windows PowerShell or PowerShell app.
- Type
az
and press Enter.
Where is the Azure CLI Installed?
While you don't typically need to navigate directly to the installation directory to run the az
command (thanks to the PATH variable), knowing the location can be useful for troubleshooting or advanced configurations.
According to the reference:
- In Windows, the 32-bit Azure CLI installs in C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2.
- The 64-bit Azure CLI installs in C:\Program Files\Microsoft SDKs\Azure\CLI2.
This is where the core files, including the az.cmd
or az.exe
executable, reside after a successful installation.
Installation Paths for Azure CLI:
Operating System | Architecture | Default Installation Path |
---|---|---|
Windows | 32-bit | C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2 |
Windows | 64-bit | C:\Program Files\Microsoft SDKs\Azure\CLI2 |
Getting Started with Azure CLI
After opening your chosen terminal and typing az
, you can start interacting with Azure. Here are some basic commands to try:
az login
: Opens a browser window for you to log in to your Azure account.az account list
: Lists the Azure subscriptions you have access to.az --version
: Shows the installed version of the Azure CLI.
By simply typing az
in a command prompt or terminal window in Windows 11, you initiate the Azure Command-Line Interface, ready to manage your Azure resources.