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

后端 未结 3 431
萌比男神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条回答
  •  盖世英雄少女心
    2021-01-31 08:29

    could be TLS security related (ref: https://rnelson0.com/2018/05/17/powershell-in-a-post-tls1-1-world/)

    Try this command first:

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

    then try to do the update. Note: the command only affects the current session and does not persist.

    You may also check what version of TLS for client is set on computer. Looks like TLS 1.0 for client is required. (ref: https://powershell.org/forums/topic/wmf-5-1-upgrade-broken-repositories/)

    Michael

提交回复
热议问题