I’m working in an office and must use http proxy to access internet.
Is there any $PSvariable or environment variable that would tell powershell to use http proxy when requesting an external ressource ? (like http_proxy env var in linux :
http_proxy=http://username:password@host:port/ )
export http_proxy
I know i can do it for webclient
$proxy = [System.Net.WebRequest]::GetSystemWebProxy()
$proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
$web = New-Object System.Net.WebClient
$web.proxy = $proxy
, do it for pssessions
$PSSessionOption = New-PSSessionOption -ProxyAccessType IEConfig -ProxyAuthentication Negotiate -ProxyCredential Domain\User
but sometimes i cant find any solution for example how to use update-help |save-help through proxy?
PowerShell (and most other things on Windows) will use the proxy settings configured in Internet Explorer. Set that up properly and it should work; you may need to access a few sites with IE to make sure any authentication is taken care of.