Use the Az PowerShell module behind a proxy
If a proxy is necessary for HTTP request, the Azure PowerShell team recommends the following proxy configuration for different platforms:
Platform | Recommended Proxy Settings | Comment |
---|---|---|
Windows PowerShell 5.1 | System proxy settings | Use the system proxy settings (internet options). |
PowerShell 7 on Windows | System proxy settings | Proxy could be configured by setting both HTTP_PROXY and HTTPS_PROXY environment variables, plus optional NO_PROXY. |
PowerShell 7 on macOS | System proxy settings | Proxy could be configured by setting both HTTP_PROXY and HTTPS_PROXY environment variables, plus optional NO_PROXY. |
PowerShell 7 on Linux | Set both HTTP_PROXY and HTTPS_PROXY environment variables, plus optional NO_PROXY | The environment variables should be set before starting PowerShell, otherwise they may not be respected. |
The environment variables used are:
- HTTP_PROXY: the proxy server used on HTTP requests.
- HTTPS_PROXY: the proxy server used on HTTPS requests.
- NO_PROXY: a comma-separated list of hostnames that should be excluded from proxying.
On systems where environment variables are case-sensitive, the variable names may be all lowercase or all uppercase. The lowercase names are checked first.
See also
Collabora con noi su GitHub
L'origine di questo contenuto è disponibile in GitHub, in cui è anche possibile creare ed esaminare i problemi e le richieste pull. Per ulteriori informazioni, vedere la guida per i collaboratori.