Posts

Showing posts from December, 2019

Using Proxy to Install-Module

Find-Module -Name PowerShellGet   # To look for a module Find-Module -Name PowerShellGet | Install-Module  # To look for a module and install that Using Proxy to connect to Internet: Import the proxy settings from Internet Explorer parameters: netsh winhttp import proxy source=ie or set them manually: netsh winhttp set proxy "192.168.0.14:80" To view current proxy setting: netsh winhttp show proxy To reset the winhttp proxy : netsh winhttp reset proxy If you are signed in using your domain account and your proxy supports NTLM/AD authentication, you can use the credentials of the current user to authenticate on the proxy server (you won’t have to enter your username/password): $Wcl = new-object System.Net.WebClient $Wcl.Headers.Add(“user-agent”, “PowerShell Script”) $Wcl.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials If you have to authenticate on the proxy server manually, run the following commands and specify use