Home> Common Problem> body text

On Windows 11 or 10, use Powershell or CMD to install the Azure CLI

WBOY
Release: 2023-09-10 21:49:01
forward
1343 people have browsed it

Prerequisites

To complete this tutorial, the user must have the following:

  • Windows OS 10 or 11 with administrative rights.
  • PowerShell access to use the Azure CLI
  • Internet connection to download the files required to install the Azure CLI

Step 1: Open PowerShell

Here, we are using PowerShell to install the Azure CLI tool, however, the steps for the command prompt will be the same as well. So, first, open any of them you want to use withadminpermissions.

To do this, click the WindowsStartbutton and search forPowerShell, then hover over it and select "Run as administrator" option.

在 Windows 11 或 10 上,使用 Powershell 或 CMD 安装 Azure CLI

Step 2: Check Winget Availability

The main motivation for this tutorial is to install Azure on Windows using only the command line. Therefore, we will not visit any website to obtain the executable file of this CLI tool. So, like Linux, we also have a package manager in Windows 10 and 11 systems, also known as "Winget". To check if it is available, run the given command and you will see its version number in the output.

winget -v
Copy after login

Step 3: Install Azure CLI on Windows 10 or 11

In this step, we will execute the "winget" command which will not only download the latest available Azure CLI tool settings , the same setup can even be installed without user intervention.

winget install Microsoft.AzureCLI
Copy after login

Step 4: Azure CLI Version

After completing the installation, first close the PowerShell or Command Prompt that you used to install it. Then open it again so that we can identify the path to the installed Azure CLI tool on our system. Once done, type the given command on CMD or Powershell and it will not only provide the only current version of the tool but also the extension directory of Azure CLI.

az --version
Copy after login
在 Windows 11 或 10 上,使用 Powershell 或 CMD 安装 Azure CLI

Uninstall (optional)

It is also very easy to remove Azure CLI from Windows if you do not need to use the command terminal. Use the same Winget package manager, but this time use the "uninstall" parameter.

winget uninstall Microsoft.AzureCLI
Copy after login
在 Windows 11 或 10 上,使用 Powershell 或 CMD 安装 Azure CLI

Now we have the Azure CLI installed on Windows, but using only the CLI. You can further check out the official documentation available on the Microsoft website for this tool to manage Azure resources, automate tasks, and streamline cloud management workflows.

The above is the detailed content of On Windows 11 or 10, use Powershell or CMD to install the Azure CLI. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yundongfang.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!