Help With Setting WinHttpRequest Options

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!

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.