Invoke-webrequest (popups)


I have a script that asks for login info, and logs on to a website (from the script). I have an if condition that checks if I was able to successfully login, and it works fine. My question is, after I login from the script, internet explorer brings up popup windows. How would I disable it? It’s kind of annoying to see the popups.

Please click on the link to see what it looks like after I login.



the popups are from ie, so I have

$ie = new-object -com "InternetExplorer.Application"
$ie.Visible = $false

But, when running script, it’s still showing windows. Plus, I have popup blocker turned on in ie, but it’s still allowing popup.

so, when I run the script as admin, it opens 6 windows, but when I just run it, it opens only 1 window