diff --git a/lib/chef/knife/core/windows_bootstrap_context.rb b/lib/chef/knife/core/windows_bootstrap_context.rb index 9281a922..dc6ab089 100644 --- a/lib/chef/knife/core/windows_bootstrap_context.rb +++ b/lib/chef/knife/core/windows_bootstrap_context.rb @@ -274,10 +274,15 @@ def win_wget_ps ) $ProxyUrl = $env:http_proxy; +$ProxyByPass = $env:no_proxy; $webClient = new-object System.Net.WebClient; if ($ProxyUrl -ne '') { - $WebProxy = New-Object System.Net.WebProxy($ProxyUrl,$true) + if ($ProxyByPass -ne '') { + $WebProxy = New-Object System.Net.WebProxy($ProxyUrl,$true,$ProxyByPass) + } else { + $WebProxy = New-Object System.Net.WebProxy($ProxyUrl,$true) + } $WebClient.Proxy = $WebProxy }