Invoke-WebRequest causes IE content blocked dialog
It seems Invoke-WebRequest requires IE unless you specify -UseBasicParsing parameter. see: https://msdn.microsoft.com/powershell/reference/5.1/microsoft.powershell.utility/Invoke-WebRequest
-UseBasicParsing Indicates that the cmdlet uses the response object for HTML content without Document Object Model (DOM) parsing.
This parameter is required when Internet Explorer is not installed on the computers, such as on a Server Core installation of a Windows Server operating system.
Perhaps systems have changed since Raf's answer above was posted. I found it didn't work for me.
What did work was:-
- Open Internet Explorer
- Go to Tools->Internet options
- Select the Security Tab
- Click Local Intranet
- Click sites
- Enter *.security_powershell.exe
- Click Add