PowerShell Installing NuGet, says unable to access internet, but I actually can

后端 未结 3 434
萌比男神i
萌比男神i 2021-01-31 07:56

I followed the steps mentioned in Using PowerShell Behind a Proxy to configure my proxy server.

netsh winhttp set proxy \"[IP]:[Port]\"
$Wcl = New-Object System.         


        
3条回答
  •  梦毁少年i
    2021-01-31 08:21

    Try this:

    [System.Net.WebRequest]::DefaultWebProxy.Credentials = System.Net.CredentialCache]::DefaultCredentials
    

    If the above doesn't work try this:

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    

提交回复
热议问题