How do I install Azure CLI with MSI

Nikola Kuzmanovic 0 Reputation points
2023-05-02T06:01:27.4666667+00:00

I am trying to install Azure CLI on my Windows server, but MSI isn't allowing these 2 HTTPS sites access:

  • https://aka.ms/
  • https://azcliprod.blob.core.windows.net/

How do I permit them access, so I can fully install and use the Azure CLI?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,415 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,465 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,210 questions
{count} votes

3 answers

Sort by: Most helpful
  1. RevelinoB 2,775 Reputation points
    2023-05-02T06:24:27.8366667+00:00

    Hi Nikola,

    If you're facing difficulties installing the Azure CLI on your Windows server due to restricted access to the following HTTPS sites:

    You can try the following steps to allow access and proceed with the Azure CLI installation:

    Firewall Settings:

    • Check your server's firewall settings to ensure that outgoing connections to external HTTPS sites are permitted. If necessary, consult with your network administrator or IT department to adjust the firewall configurations accordingly.

    Proxy Configuration:

    • If you're using a proxy server to access the internet, make sure that the proxy settings are correctly configured on your Windows server. This might involve setting the proxy configuration in environment variables or using a .npmrc file for the Azure CLI installation.

    Network Restrictions:

    Temporary Workaround:

    • As a temporary solution, try downloading the Azure CLI MSI installer from a different machine that has internet access. Once downloaded, transfer the installer file to your Windows server and proceed with the installation.

    Try to work with your network administrator or IT department to ensure that any changes align with your organization's security policies.

    I hope this helps?

    0 comments No comments

  2. Limitless Technology 44,081 Reputation points
    2023-05-02T11:37:13.2233333+00:00
    Hello, 
    
    You can download it from the next Microsoft article:
    
    https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli#install-or-update
    
    If you are using a proxy, you will need to run first this in Powershell in order to obtain the credentials to pass through the proxy connection:
    
    (New-Object System.Net.WebClient).Proxy.Credentials = `
      [System.Net.CredentialCache]::DefaultNetworkCredentials
    
    --If the reply is helpful, please Upvote and Accept as answer--
    
    0 comments No comments

  3. JamesTran-MSFT 36,516 Reputation points Microsoft Employee
    2023-05-15T20:09:35.9966667+00:00

    @Nikola Kuzmanovic

    Thank you for your post and I apologize for the delayed response!

    I understand that when trying to install Azure CLI from your Windows machine using the Microsoft Installer (MSI), you're running into the below HTTPS access restrictions.

    • https://aka.ms/
    • https://azcliprod.blob.core.windows.net/

    In order to get the MSI, your proxy needs to allow HTTPS connections to the above addresses and if you can't download the MSI installer because your proxy is blocking the connection, please make sure that you have your proxy properly configured.

    For Windows 10, these settings are managed in the Settings > Network & Internet > Proxy pane. Contact your system administrator for the required settings, or for situations where your machine may be configuration-managed or require advanced setup.

    Note:
    // These settings are also required to be able to access Azure services with the CLI, from both PowerShell or the Command Prompt. In PowerShell, you do this with the following command:
    
    (New-Object System.Net.WebClient).Proxy.Credentials = `
      [System.Net.CredentialCache]::DefaultNetworkCredentials
    

    For more info - Proxy blocks connection

    I hope this helps!

    If you're still having issue, I'd recommend reaching out to our Azure CLI Experts via their Azure CLI GitHub Issues page. For more info - Troubleshooting Azure CLI on Windows.

    If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.


    If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.