Jun 15 2022 04:58 PM
Hi Support,
Any idea or workaround how to do this on PowerShell?
I want to invoke a web request but it needs a authentication via cloud.
I already tried Invoke-WebRequest -Uri "https://www.google.com" -Credential $credential
So far its not working. Thanks.
Jan 09 2023 01:20 PM
Hello @Alan2022,
There are two parameters of Invoke-WebRequest to cover your use case: Proxy and ProxyCredential
Proxy accepts URI of the proxy server and ProxyCredential is a type of PSCredential.
So in your case it would be:
Invoke-WebRequest -Uri "https://www.google.com" -Proxy "<Proxy Server URL>" -ProxyCredential $credential
Reference: Invoke-WebRequest
Hope that helps.