?
Solved

Update IE Favorite for all users in Windows 7

Posted on 2014-08-19
5
Medium Priority
?
1,112 Views
Last Modified: 2014-08-19
Does anyone know of a way to try and accomplish this?

Basically, I'm trying to make a script that when deployed to the computer, it will scan through the local C-Drive for any shortcut type of file called "VPN" which would most likely have the extension .url (the extension/format of an Internet Explorer favorite shortcut).

Then how can the script delete that .url and replace it with another shortcut ("New VPN.url" from a network share?

With PowerShell, I've got this so far:
Get-ChildItem C:\Users -Recurse | ? {$_.Name -like "*VPN*"}

But not sure if Powershell is the way to go and what to pipe this to, or, if maybe batch script is a better way to go which I'm not very familiar with.
0
Comment
Question by:garryshape
  • 3
  • 2
5 Comments
 
LVL 41

Expert Comment

by:footech
ID: 40271415
For deploying a URL I'd go with Group Policy Preferences.  Get rid of the existing one, then deploy a new shortcut with GPP.  It's then easy to update it at any time.
0
 

Author Comment

by:garryshape
ID: 40271427
I think some people have the favorite stored in difference places though, like c:\users\%username%\favorites or sub-folder "Favorites bar", as well as maybe on their Desktop folder.

As for Group Policy, what could that do for me here as far as deleting old ones and adding a new one? Would it interfere with their other shortcuts, or make everyone have completely identical Favorites all together?
0
 

Author Comment

by:garryshape
ID: 40271489
So maybe I can do something like:

$shortcuts = Get-ChildItem C:\Users -Recurse | where {$_.Name -like "*VPN*.url"}

Then how can you replace each file with another file
0
 
LVL 41

Accepted Solution

by:
footech earned 2000 total points
ID: 40271511
And that's one area where I would standardize.  You can deploy a shortcut (like on the Desktop), or you can deploy a Favorite, or both if really need be.  As far as deleting old ones (or modifying existing ones), GP may not help here, but you could try the "Update" action (I haven't played around with modifying an existing shortcut/Favorite that wasn't created by GP).  But deploying, and then subsequently updating, would be a snap.  It wouldn't interfere with any existing Favorites.  You may check this out for an example of using this.
http://thommck.wordpress.com/2013/11/14/using-group-policy-preferences-to-deploy-favorites-to-internet-explorer/

You may just want to use a script like your line above and just delete each match, then use GPP to create the new one.
0
 

Author Closing Comment

by:garryshape
ID: 40271515
Ok thanks, makes sense. delete with script then standardize with GP. best way to go . thanks
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month16 days, 22 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question