Windows 10 Internet Options~Powershell Invoke-WebRequest “Windows Security Warning ”

Jul 31, 2015
Reaction score
Alright this is one big problem in my opinion that Microsoft needs to address immediately. Steps to reproduce this:

powershell> Invoke-WebRequest "" (Let's do for example)

What happens is that you get the following warning:

Now this is just horrible. Why Microsoft thinks this is acceptable is beyond me, however in Windows 8.1 there was a workaround. If you went into:

Control Panel > Internet Options > Privacy

You could set cookies to be accepted all the time. This was the only way to get rid of this message and still retain DOM parsing functionality. -UseBasicParsing isn't a solution for me, because I want to use the functionality of what Invoke-WebRequest returns without basic parsing.

However now in Windows 10 Microsoft decided to get rid of this slider for whatever reason:

This problem can be reproduced on every Windows 10 machine and completely destroys how Invoke-WebRequest can be used in a silent scripting environment, because the script hangs and waits for the dialog to be answered. Is there a way to still set Cookies to be accepted for all like in 8.1? I tried every setting in Internet Options in Windows 10, but nothing holds the key. I believe they stopped using it and perhaps moved that setting elsewhere, but I can't find it. Microsoft Edge doesn't have many settings either, so none of them were helpful.

This is just infuriating. Any help would be highly appreciated, as this will create quite a chaos in many environments.


Mar 4, 2016
Reaction score
Another extremely old thread!

Invoke-WebRequest works fine in Windows 10, so I assume your issue was corrected during a Cumulative update.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question