Question

I need to connect to Office365 portal using powershell via a proxy server. I read an article here which says calling:

New-PSSessionOption -ProxyAccessType IEConfig

with IEConfig should do the trick.

But, is there a way that I can give proxy server without having to rely on IEConfig. i.e is there any other way to generate a -ProxyAccessType ? Something on the lines

$proxyserver = New-Object ProxyAccessType(server ip ...)

and then use the proxyserver in New-PSSessionOption -ProxyAccessType $proxyserver

Was it helpful?

Solution

From http://technet.microsoft.com/en-us/library/hh849703.aspx the supported values are IEConfig, WinHttpConfig, AutoDetect, NoProxyServer and None. The default value is None.

WinHTTPConfig can be set using netsh http://technet.microsoft.com/en-us/library/cc731131%28v=ws.10%29.aspx

AutoDetect will use the wpad protocol to determine proxy settings http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol which can be kludged with a wpad file

Good Luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top