Invoke-WebRequest does not accept save all cookies in SessionVariable (bug)
Invoke-WebRequest saves most, but not all, cookies that have been set in SessionVariable. Leading to a difficult to troubleshoot bug.
Invoke-WebRequest should save all cookies that have been set by server response, just as a web browser would do. Otherwise, there is little point to having SessionVariable at all!

1 comment
-
Anonymous commented
Having the same issue. Tried to workaround the issue by parsing the response headers (.Headers."set-cookie") but it proved to not be good enough; supposedly due to missing cookie, the server goes in a loop of redirection, where it's resending the set-cookie directive.