Install Azure CLI on Windows Without Admin Rights

Install Azure CLI On Windows

In this Azure tutorial, we will discuss installing Azure CLI on Windows.

Install Azure CLI Without Admin Rights

Let’s discuss an interesting topic, i.e., Install Azure CLI On Windows. But before starting the installation, you can check out a quick tutorial on Azure CLI for a better understanding.

Assuming we have some idea about Azure CLI, let’s start with the main topic, i.e., Installing Azure CLI On Windows.

You can install the Azure CLI On Windows in two ways.

  • Use the Microsoft Installer (MSI)

You can download the Azure CLI executable file from the path below and install that on your machine

https://aka.ms/installazurecliwindows

Once you access the above URL, it will prompt you to save the Azure CLI executable file in your local path. It will take a few minutes to download the executable file. Once you download the executable file, You can double-click on the executable file to install the Azure CLI setup.

azure cli without admin rights

As the next step, select the “I accept the terms in the License Agreement” option and click the Install button to start the installation process.

azure cli download for windows
  • Microsoft Installer (MSI) with PowerShell command (install Azure CLI on Windows PowerShell)

Another way is to install the Azure CLI using the PowerShell cmdlet. you can use the below PowerShell cmdlet to install the Azure CLI.

Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi

Note: One important thing to note here is. If you have already installed the Azure CLI on your machine and are trying to run the PowerShell cmdlet on top of that, it will update the Azure CLI to the latest version.

After executing the script, you might get the error ” Invoke-WebRequest: The operation has timed out”. The complete error message is as follows.

Invoke-WebRequest: The operation has timed out.
At line:1 char:1

  • Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile …
  • ~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebReq
      uest) [Invoke-WebRequest], WebException
    • FullyQualifiedErrorId: WebCmdletWebResponseException, Microsoft.PowerShell.Comm
      and.InvokeWebRequestCommand

But if you try executing the same script once or twice, it will work for you, and Azure CLI will install successfully without any issues. This is how we can install Azure CLI On Windows.

You can also check out How to install Azure CLI on Mac.

Update Azure CLI Version

Suppose you already have the Azure CLI installed on your machine and want to upgrade to the latest version of Azure CLI, then you can execute the below PowerShell cmdlet to upgrade the Azure CLI version to the latest one.

az upgrade

After installing Azure CLI, you can check out How to log in to Azure CLI.

Run the Azure CLI

Okay, now, we have done with the installation of Azure CLI, and then we have discussed how to update the Azure CLI version. Now, Let’s discuss How to run the Azure CLI. You can use the Windows command prompt or PowerShell to execute the commands. Follow the below steps to run the Azure CLI.

Step-1: Run the below az command to login

az login

 Once you execute the above PowerShell cmdlet, it will prompt you to sign in with the Browser.

Step 2: Enter your account credentials to log in.

Check out Uninstall Azure CLI Windows

FAQs

In which operating system, we can use Azure CLI?

Answer: Windows, Linux, macOS, etc.

Unable to locate package azure-CLI [Soluton]

There might be a chance that you will get an error “Unable to locate package azure-cli” . If you are getting this error, then you can fix the same issue by running the below cmdlet

sudo apt-get update && sudo apt-get upgrade

You may also like following the articles below

Wrapping Up

In this article, we have discussed installing Azure CLI On Windows. I hope you have enjoyed this article !!!