3

I can get and set proxy settings for a WebClient object and make outbound calls.

I can also supply -Proxy and -ProxyCredential to individual CmdLets, but how can I just set a global default so CmdLets don't need the extra arguments?

Thanks

Luke

1 Answer 1

2

From https://joshcodev.wordpress.com/2014/02/07/powershell-set-a-proxy/,

$global:PSDefaultParameterValues = @{ 'Invoke-RestMethod:Proxy'='http://proxyServer:proxyPort' 'Invoke-WebRequest:Proxy'='http://proxyServer:proxyPort' '*:ProxyUseDefaultCredentials'=$true }

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .