I'd like to know how I can use Invoke-WebRequest and enable registeration of cookies. Currently there's a site that uses get/set and cookies and it's sort of built of thousands of pages. Each page consists the ID of the next page and I tried doing a loop that runs through and refers me to the last page, but because the webrequest doesnt keep the cookies, it keeps thinking im still on page 1.
How can I enable the storage of cookies for the webrequest so it wont think im still there?