没有获得所有href链接与invoke-webrequest

时间:2016-06-28 13:12:56

标签: powershell powershell-v2.0 powershell-v3.0

我使用此脚本登录网站:

$r = Invoke-WebRequest 'https://www.slika-ins.co.il/Login.aspx' -SessionVariable sat
$form = $r.Forms[0]
$form.fields["MainContent_txtUserName"] = "xxx"
$form.fields["MainContent_txtPassword"] = "xxx"

$login=Invoke-WebRequest -Uri ("https://www.slika-ins.co.il/" + $form.Action) -WebSession $sat -Method POST -Body $form.Fields

当我运行命令$login.Links.href时,我没有获得所有可能的链接。

但是,当我使用“InternetExplorer.Application”的ComObject时,我会获得所有可能的链接。

0 个答案:

没有答案
相关问题