Garry Shape
asked on
Update IE Favorite for all users in Windows 7
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.
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.
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.
ASKER
I think some people have the favorite stored in difference places though, like c:\users\%username%\favori tes 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?
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?
ASKER
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
$shortcuts = Get-ChildItem C:\Users -Recurse | where {$_.Name -like "*VPN*.url"}
Then how can you replace each file with another file
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok thanks, makes sense. delete with script then standardize with GP. best way to go . thanks