Using Group Policy Preferences to deploy Favorites to Internet Explorer

My previous article, The new way to configure Internet Explorer proxy settings with Group Policy, spoke about how the Internet Explorer Maintenance section of Group Policy has been killed off in favour of ADMX templates and Group Policy Preferences. One benefit of this is that you get rid of the time-consuming “Branding Internet Explorer” section when a user logs on to a PC.

Thanks to the lack of communication from Microsoft, we now need to scramble around to get all of our Internet Explorer Favorites re-deployed for any PC with IE10 or above. Thankfully it is a relatively simple, if tedious task. I used the GPMC on a 2008 R2 member server

Can we script it?

No, we can’t.

I foolishly thought I could use PowerShell to automate this. Simply scan the existing favorites on a machine and pipe them into GPPs. Unfortunately, the functionality to create non-registry GPPs doesn’t exist. The only bit of scripting I found was from the MadProps! Blog. I tweaked it a bit so I could get a CSV file containing the name and the URL of each Favorite in alphabetical order.

The script is provided “as is” and was created using PowerShell v3

# Gathers a list of the current users IE Favorites
Get-ChildItem $env:userprofile\favorites -Recurse -Include *.url |
 where {select-string -InputObject $_ -Quiet "^URL=http"} | 
 select @{Name="Name"; Expression={[IO.Path]::GetFileNameWithoutExtension($_.FullName)}},
 @{Name="URL"; Expression={get-content $_ | ? {$_ -match "^URL=http"} | % {$_.Substring(4)}}} |
\#Sorts and exports them to a CSV on user's Desktop
 sort Name |Export-Csv -Path $env:userprofile\Desktop\favorites.csv -NoTypeInformation
\#Opens the CSV file for reading
Invoke-Item $env:userprofile\Desktop\favorites.csv

You can use this CSV to copy and paste details when you are creating the relevant GPPs

Favorites = Shortcuts

Now we have our list of Favorites, it is time to create them as Shortcuts under Group Policy Preferences

  1. Open up the Group Policy Management Console (on a Server 2008 or above machine)
  2. Create a new Group Policy Object (or open an existing one if you are feeling brave)
  3. Navigate to User Configuration > Preferences > Windows Settings > Shortcuts

    screenshot - Shortcuts in the Group Policy Editor
    The ever ugly Group Policy Preferences interface
  4. You can use the Shortcuts section of GPP to create all sorts of links for the Desktop, Start Menu, Programs or URLs. To create a new Favorite, right-click Shortcuts > New > Shortcuts
  5. The brings up the Properties panel for a new shortcut. If you’ve used GPPs before, you should be familiar with the layout

    screenshot of new shortcut properties
    With many options comes even more ugliness
  6. I’ve filled out the key bits of information needed as I don’t need anything fancy like custom icons
    1. Action = Update – This creates a new shortcut or updates an existing one
    2. Name = Whatever you want to show up in the user’s favorites.
      1. Tip: You can create a new subfolder for the Favorites by using a backslash e.g. “Corp Shotrcuts\Thom’s HeadSpace”
    3. Target Type = URL (because it’s a web link not an app shortcut)
    4. Location = Explorer Favorites – This creates the favorite in the main folder of IE Favorites (e.g. %USERPROFILE%\Favorites). You could choose Explorer Links if you want it to appear on the Favorites Bar
    5. Target URL = The destination address where you want the Favorite to link to.
    6. If you want the favorite to be removed when the policy no longer applies, click the Common tab and tick the 3rd checkbox. This will change the Action to Replace, which means the shortcut gets deleted and recreated each time the policy is applied.
    7. If you need more help, click the Help button! It actually opens a very detailed help file that explains everything
  7. That’s all there is to it. Just repeat for all of your Favorites
    1. Tip #1: You can use the CSV file from the first bit of this article to copy the Names and URLs for each shortcut. This saves time and avoids typo’s!
    2. Tip #2:   After you have created the first Shortcut item, right-click it and select copy, then paste it as many times as you want. This speeds up the creation process slightly
    3. Tip #3: If you think you will be doing this a lot, you could create an AutoHotKey Macro to automate it completely

Other Options

As always, there is more than one way to skin a cat. Other options I’ve heard of are;

  • set up a folder of favorites on a network share (like SYSVOL\NETLOGON) and script a file copy process at log on
  • use PowerShell to create new links in the users favorites folder

I prefer the visibility of GPPs so I’ll stick with them for now


15 thoughts on “Using Group Policy Preferences to deploy Favorites to Internet Explorer

    1. If I delete a favorite the Group Policy pushed the shortcut back, but it is not sorted alphabetically. I just puts it at the bottom of my list? Any ideas how to sort these from GPP?


      1. I don’t think you can automate it to re-alphabatize the favorites list.
        One thing you could do is set the action on the GPP from “Update” to “Replace”. That way it would recreate all the favorites in an ordered manner each time


  1. I just add important favorites that we push out with a . before it. I tell users to right click their favorites and sort by name and then they are all up top.


    1. We actually put all of our shortcuts into a subfolder, that way you don’t mix/mess with their personal ones.
      You could also place it on the “favorites bar”so it is nicely visible


  2. Any suggestions on how to make IE 10 and 11 Favorites folders (and then populate them) with group policy? I can push Favorites, but I’d love to group them like I could with previous versions.


    1. I’m not sure if I understand you correctly but you can create folders by using a ‘\’ in the Shortcut name e.g. (from point 6.2.1) You can create a new subfolder for the Favorites by using a backslash e.g. “Corp Shotrcuts\Thom’s HeadSpace”


    1. I think it specifies that in the actual GPP properties help itself but from memory

      create only adds it if it doesn’t already exist, update will create a non existent file or update an existing one, replace deleted the existing one and creates a new one.

      So they are all similar but chose whatever works for you


  3. Wouldn’t it also be possible to place a folder of favorites on a network share and use GPP to push a registry change to point IE’s favorites to look at the registry share instead of its default location?


      1. Script is working fine . We have favorites within the sub folders . Is there a way we can have them exported to CSV format along with the regular one’s ?


What do you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.