Invoke-WebRequest https://www.pstips.net -Proxy https://www.proxy.net -ProxyCredential user001
怎么加上proxy的密码呢? 一直timeout 我的脚本是以下:
$user = “70504460”
$PWord = ConvertTo-SecureString -String “jx222222” -AsPlainText -Force
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord
#$Credential = System.Management.Automation.PSCredential($user,$PWord)
Invoke-WebRequest “http://www.baidu.com” -Proxy “http://g-proxy.hitachi.cn:8080/” -ProxyCredential $user
怎么加上proxy的密码呢? 一直timeout 我的脚本是以下:
$user = “70504460”
$PWord = ConvertTo-SecureString -String “jx222222” -AsPlainText -Force
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord
#$Credential = System.Management.Automation.PSCredential($user,$PWord)
Invoke-WebRequest “http://www.baidu.com” -Proxy “http://g-proxy.hitachi.cn:8080/” -ProxyCredential $user