设置方法 以新版 Powershell Core 即 Pwsh 为例,在命令行中设置当前会话代理 Proxy 的方法为(假设代理地址为 http://127.0.0.1:12345): $env:HTTP_PROXY="http://127.0.0.1:12345"; $env:HTTPS_PROXY="http://127.0.0.1:12345" # or $env:ALL_PROXY ="http://127.0.0.1:12345" 参考链接 Bypass proxy for all web requests in Powershell CoreMS Learn - HttpClient.DefaultProxy PropertyUse the Az PowerShell module behind a proxyPowershell命令行设置代理