Include UseBasicParsing switch
By default Invoke-WebRequest will fail if IE hasn't gone through first configuration setup on the machine. Parts of our infrastructure don't run IE and as a result our uses of Invoke-WebRequest were failing. Fixed by passing the UseBasicParsing switch.
想要评论请 注册 或 登录