How to bypass the default proxy in Windows while accessing a locally accessible URL?
By default the Invoke-WebRequest powershell cmdlet is using the default proxy server. In my setup the proxy allows only certain URLs and the locally accessible URL is not in that list.
Is there a way to bypass the proxy? I can add the URL to the proxy allowed list but I don't want to do that.
Thanks for the attention.
You can programmatically bypass proxy for local addresses and even return the old bypass list after you are done.
My function proxy will let you do that. Add your domain or server name or its IP address to override list:
Otherwise, I think this should work: