User Tools

Site Tools


Sidebar

microsoft:powershell_proxy

This is an old revision of the document!


Using PowerShell Behind a Proxy

If you access the Internet in the organization via the proxy server, by default you won’t be able to access an external webpage (Invoke-WebRequest cmdlet), update help using Update-Help cmdlet or download an application package from an external package repository (using PackageManagement or NanoServerPackage) from your PowerShell session. In this article we’ll show how to get the Internet access via proxy server with the authentication from a PowerShell session.

Let’s try to update PowerShell Help:

Update-Help

Or access an external web page:

Invoke-WebRequest http://woshub.com

If you haven’t got a direct Internet connection, the command will return a similar error:

update-help : Failed to update Help for the module(s) ‘DhcpServer, DirectAccessClientComponents….’ with UI culture(s) {en-US} : Unable to connect to Help content. The server on which Help content is stored might not be available. Verify that the server is available, or wait until the server is back online, and then try the command again.
Invoke-WebRequest: Unable to connect to the remote server

microsoft/powershell_proxy.1551172520.txt.gz · Last modified: 2019/02/26 10:15 by admin