How to batch add URLs to trusted sites in Internet Explorer

This PowerShell script sample shows how to batch add URLs to trusted sites in Internet Explorer.

Powershell.zip
 
 
 
 
 
4.5 Star
(2)
11,124 times
Add to favorites
3/10/2017
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • How to add to other IE browsers
    1 Posts | Last post October 26, 2018
    • This script seems to work fine for my local IE. How can I push this out to other IE browsers?I am specifying ./AddingtrustedSites.ps1 -Trustedsites "xxxxxx.org" and this adds the domain to my safe sites list in IE. I want to push this out to other machines.  Is there a way I can do this?
      
      Very Kind regards
      Dave 
  • Does this restrict users from adding additional sites to the list?
    1 Posts | Last post August 14, 2018
    • I was hoping to find a way to edit add sites to the trusted sites while still allowing users to add their own.  the only way I have figured out so far is with a registry change.
  • How to add website in the Local intranet security zone using power shell script?
    2 Posts | Last post November 15, 2016
    • How to add website in the Local intranet security zone using power shell script?
      
      Currently we are doing the task using the below steps.
      
      To add a website in the Local intranet security zone
      
      1) Open Internet Explorer by clicking the Start button , and then clicking Internet Explorer.
      2) Click the Tools button, and then click Internet Options.
      3) Click the Security tab, and then click Local intranet.
      4) Click Sites.
      5) Advanced
      6) Add site
    • Better late than ever - you can grab a copy of this script and change this line:
      
      $DWord = 2
      
      To:
      
      $DWord = 1
      
      
      The DWord = 2 signifies that you're specifying the URL as a Trusted site whilst putting in 1 would put it into Local intranet sites.
  • How do I add an IP address?
    1 Posts | Last post November 15, 2016
    • I'll be cheeky and answer myself here. It appears the script will happily accept IP's as trusted sites but if you add them that way IE get's confused, can't delete them and won't actually apply them to the zone.
      
      This is due to IP ranges having to be added under the ZoneMap\Ranges key instead. I created a modified script based on this AddingTrustedSites.ps1 to account for this.
      
      You may find it at this gist address:
      https://gist.githubusercontent.com/ddikman/30178994b4c790786b8f70142afcce49/raw/6a18e0ba1308d8e02aab0e505c34d064fc4ff249/AddingTrustedRanges.ps1