Well, you can accept session cookies and use them in future calls to Invoke-WebRequest via the -SessionVariable and -WebSession parameters, but I’m not sure that’s what you need. I haven’t seen a pop-up box related to cookies when using Invoke-WebRequest before.
# Set up a session variable on the first call to Invoke-WebRequest Invoke-WebRequest @otherParams -SessionVariable myWebSession # Use the session in future calls Invoke-WebRequest @otherParams -WebSession $myWebSession