Run PowerShell through a Proxy

Posted by robd on August 27, 2019
powershell, Proxy

At work I’m behind a proxy which caused me havock when trying to install modules into PowerShell.

That was until I found this amazing script to tell PowerShell to use a proxy.

First open your PowerShell profile by either doing this in PowerShell:

Or open “Microsoft.PowerShell_profile.ps1” and  “Microsoft.PowerShellISE_profile.ps1” in Explorer with notepad:

Once open, paste in the following, editing the proxy address and port.

This will use your current credentials you’re logged in with to pass the commands to the proxy server.

Test with a

 

Tags: , ,

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copy Protected by Chetan's WP-Copyprotect.