{{category Windows PowerShell,nolink}} WinHTTP(Windows HTTP Services)とは、Windowsの機能の一つで、IPネットワーク上でHTTP通信を行うサービス。Windows Update などで利用される。 !!! WinHttp の proxy 設定 レジストリ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections の WinHttpSettings に設定があるが、バイナリで記載されている。 確認や設定変更は、 netsh コマンドで行える(変更時は管理者権限が必要)。 !! netsh コマンド ! 現在のwinhttpのプロキシ設定状況を見る netsh winhttp show proxy ! ieのプロキシ設定をwinhttp proxyにも踏襲する。 netsh winhttp import proxy source=ie ! winhttp proxy設定をリセットする。 netsh winhttp reset proxy ! winhttp proxy設定を手動で行う。 netsh winhttp set proxy proxy-server="xxx.xxx.xxx.xxx:8080" bypass-list="yyy.yyy.yyy.*;" !!! PowerShell !! get winhttp proxy setting by powershell(using p/invoke) winhttp.dll の WinHttpGetDefaultProxyConfiguration をロードして取得する https://gist.github.com/itn3000/b414da5337b7d229d812ec3ddcffb446 !! netsh winhttp * proxy, but in PowerShell Pure PowerShell. 取得と変更 https://gist.github.com/XPlantefeve/a53a6af53b458188ee0766acc8508776 !! WinHttpProxy https://www.powershellgallery.com/packages/VMware.Cloud.Director.Community/0.1/Content/Private%5CGet-WinHttpProxy.ps1