How to multiple url to a GPO setting listbox

SAKHO Mohamed (Externe) 1 Reputation point
2020-09-24T16:51:40.433+00:00

Hello,

I created a GPO which I have to set more than 1000 urls in order to allow cookies.
I found the policy but I don't know how toadd all my 1000 urls. From the window of the policy (attached file) I can add one url at time.
Does somebody can helpme please. It's may possible by powershell or other things?
Thank you by advance.27633-2020-09-24-18-49-02-window.png

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
8,159 questions
Windows Group Policy
Windows Group Policy
A feature of Windows that enables policy-based administration using Active Directory.
1,871 questions
No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Vicky Wang 2,556 Reputation points
    2020-09-25T08:57:53.343+00:00

    Hi,@SAKHO Mohamed (Externe)

    Starting from 2008R2 ADDS introduce a PowerShell module for managing GPO called “GroupPolicy”. In this module there is a cmdlet called Set-GPRegistryValue this type of policy can configure registry-based Policy.
    With the settings collected from the LGPO I’m able to use this cmdlet to set the 700 Urls:

    =====================================================

    Read Urls from a file on disk.

    $Urls = get-Content .Urls.txt

    Build a loop to add all the Urls to the specified CPO.

    foreach ($Url in $Urls)
    {

    Set-GPRegistryValue -Name ListBoxGPO -ValueName $Url -Type String -Value $Url -Key “HKLMSOFTWAREPoliciesMicrosoftWindowsCurrentVersionInternet SettingsRestrictedProtocols1”      
    

    }

    =====================================================

    Verify correct execution of the script by editing the GPO from the GPMC and check the content of the Listbox:

    Hope this information can help you
    Best wishes
    Vicky

    No comments

  2. SAKHO Mohamed (Externe) 1 Reputation point
    2020-09-25T10:30:08.643+00:00

    I already saw this answer, but what I need is for Microsoft Edge, I already launch the LGPO.exe to know which registry to set for this setting, but on the client the key doesn't exist.

    https://learn.microsoft.com/en-us/answers/questions/107003/how-to-multiple-url-to-a-gpo-setting-listbox.html


  3. Vicky Wang 2,556 Reputation points
    2020-09-29T06:48:14.19+00:00

    Hi,@SAKHO Mohamed (Externe)
    Dear user, thank you for posting in our forum.
    Seeing that you have consulted this question on the forum before, we can add multiple URLs through GPO, but the method is the same as yours, and you can only add them one by one.
    If you want to add in batches, you can try to use the method of deploying a boot script, but our ADDS forum does not provide a script method, you can go to the script forum to follow the help
    Links are scripted:https://social.technet.microsoft.com/Forums/Windows/en-US/home?forum=winserverpowershell
    Hope this information can help you
    Best wishes
    Vicky

    No comments