PowerShell v3 Invoke-WebRequest: Troubles with forms

前端 未结 4 410
花落未央
花落未央 2021-01-04 04:38

Since I upgraded to Windows 8 a lot of my PowerShell scripts relying on launching an invisible IE won’t quite work anymore, so I tried switching to the Invoke-WebRequest

4条回答
  •  星月不相逢
    2021-01-04 05:22

    To address your problem with the unsigned/untrusted certificate, add the line

    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
    

    before the Invoke-WebRequest statement

提交回复
热议问题