2

Sometimes, our clients requests firewall rules for their web servers connect to a certain URL but it turns out that the URL's IP address is dynamic, so we resort to using the proxy. One way that we use to test the proxy rules is to pull up the web servers' browser e.g. IE then set it up to use our proxy server then hit the URL on the browser. Our clients have a lot of web servers that we host so we would like to automate the testing part. Any ideas on doing it using PowerShell?

1 Answer 1

2

I'm not sure if it does what you want. But the is code which I found some days ago:

$secPasswd=ConvertTo-SecureString "password" -AsPlainText -Force
$myCreds=New-Object System.Management.Automation.PSCredential -ArgumentList "Domain\name",$secPasswd
$Site="http://www.google.com"
$Test=Invoke-WebRequest -URI $Site -Proxy 'http://ipadress:port' -ProxyCredential $mycreds
$Test.StatusDescription 
Sign up to request clarification or add additional context in comments.

1 Comment

This is perfect. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.