Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: accept a cookie while using Invoke-WebRequest

$
0
0

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

Viewing all articles
Browse latest Browse all 13067

Trending Articles