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.
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