代码:
New-Object System.Net.WebProxy($Env:http_proxy, $true, @('localhost', '*.domain.com')
失败并显示以下错误:
New-Object : Exception calling ".ctor" with "3" argument(s): "parsing "*.domain.com" - Quantifier {x,y} following nothing."
At line:1 char:6
+ $p = New-Object System.Net.WebProxy($Env:http_proxy, $true, @('*.domain.com', 'l ...
该Quantifier {x,y} following nothing
是正则表达式错误,很奇怪。我试图使用正则表达式转义字符,但什么也没有。
有什么解决方案吗?
我至少弄乱了两次-但是以下内容似乎一次正确地添加了一次:
$wp = New-Object System.Net.WebProxy($Env:http_proxy, $true)
$wp.BypassArrayList.Add('localhost')
$wp.BypassArrayList.Add('*.domain.com')
输出
Address :
BypassProxyOnLocal : True
BypassList : {localhost, *.domain.com}
Credentials :
UseDefaultCredentials : False
BypassArrayList : {localhost, *.domain.com}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句