none
Adding a site to the trusted sites to all domain users using powershell script

    Question

  • Hi there,

    I would like to know when will the changes take effect. Here's what I've done so far to add the site to the IE trusted sites

    1- used powershell in admin mode on the Domain Controller

    2- the site was added successfully and is listed under internet options \ security\ sites\ trusted sites

    3- did a gpupdate /force to update the changes 

    When I login to a client workstation and go to internet options \ security\ sites\ trusted sites I don't see the site listed there it's only listed under domain controller ! when will these changes take effect for the rest of the domain users ? am I missing something here ?

    Monday, April 20, 2015 1:46 PM

Answers

All replies

  • Hi MohamedHafez,

    Generally if you have used Gpudate / force - then the changes should get applied soon and probably take client reboot as well.

    It would help to understand better, if you provide the script you used to update the URL.


    Monday, April 20, 2015 1:59 PM
  • Thank you for all your help in advance

    here's the URL link to the script I used 

    https://gallery.technet.microsoft.com/scriptcenter/How-to-batch-add-URLs-to-c8207c23

    and here's a part of the script that does the action needed 

    If($TrustedSites) 
    { 
        #Adding trusted sites in the registry 
        Foreach($TruestedSite in $TrustedSites) 
        { 
            #If the user does not specify the user type, by default the script will add the trusted sites for the current user. 
      
            If($HTTP) 
            { 
                CreateKeyReg -KeyPath $UserRegPath -Name $TruestedSite  
                SetRegValue -RegPath "$UserRegPath\$TruestedSite" -blnHTTP $true -DWord $DWord 
                Write-Host "Successfully added '$TruestedSite' domain to Internet Explorer trusted Sites." 
            } 
            Else 
            { 
                CreateKeyReg -KeyPath $UserRegPath -Name $TruestedSite  
                SetRegValue -RegPath "$UserRegPath\$TruestedSite" -blnHTTP $false -DWord $DWord 
                Write-Host "Successfully added '$TruestedSite' domain to Internet Explorer trusted Sites." 
            } 
        } 
    }

    Monday, April 20, 2015 5:25 PM
  • > here's the URL link to the script I used
     
    This script simply configures the current user on the current computer,
    nothing else... To do this with group policy for domain accounts, follow
     

    Greetings/Grüße, Martin

    Mal ein gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me - coke bottle design refreshment (-:
    • Marked as answer by MohamedHafez Tuesday, April 21, 2015 4:13 PM
    Tuesday, April 21, 2015 10:56 AM
  • Exactly this applies to the current user and to that system where it has been ran.

    You need to use new group Policy to have this applied across the clients machine where you need to make this changes in trusted site of internet explorer.

    Probably, settings you can use depending upon the requirement, it may be user/ computer policy based settings

    Computer Configuration/Policies/Administrative Templates/Windows Components/Internet Explorer/Internet Control Panel/Security Page/Site to Zone Assignment List

    User Configuration/Policies/Administrative Templates/Windows Components/Internet Explorer/Internet Control Panel/Security Page/Site to Zone Assignment List

    • 1 = Intranet/Local Zone
    • 2 = Trusted Sites
    • 3 = Internet/Public Zone
    • 4 = Restricted Sites

    Then assign this policy to certain set of users or computer.

    Please hope I have answered your query, If yes, please vote as answered.

    Tuesday, April 21, 2015 1:02 PM
  • Thank you for your input. We checked today and what I found was once the users re authenticate [logout/login] IE detects that its a trusted site. I am guess the changes were applied to the whole domain however according to you they are not and I will have to role it out to domain users using new GPO. 
    Tuesday, April 21, 2015 4:15 PM