Help With Setting WinHttpRequest Options

This topic contains 1 reply, has 2 voices, and was last updated by  Bart Hoofd 4 years, 4 months ago.

  • Author
    Posts
  • #4956

    ccrews
    Participant

    Hi, I haven't been able to figure out how to set the options for the WinHttp.WinHttpRequest.5.1 type. My code takes a url and returns its status. Howerever, I need it to correctly report redirects and it doesn't. I read somewhere that it might work the way I want it to if I disable the redirects option. Problem is that I can seem to figure out how to set it correctly.

    How do I correctly set $xHTTP.Option($WinHttpRequestOption_EnableRedirects) = $false?

    Please and thanks!

  • #8578

    Bart Hoofd
    Participant

    The problem seems unfixable; you might want to explore http://social.technet.microsoft.com/Forums/scriptcenter/en-US/0669b8e2-cd0c-4122-9311-fda174e81709/powershell-with-winhttpwinhttprequest51 and use the alternative method.

You must be logged in to reply to this topic.