Clearing Cookies & Temporary Internet Files in Roaming Profiles.

I have a file server that houses roaming terminal server profiles for each Active Directory user.  When the users logs in to either Terminal Server, the profile is copied down to the server.  For some users, this process takes 5 minutes.  These users have 100+mb of temporary internet files, and, in some cases thousands of cookies.

Anyone have a script to run at login, or group policy settings, etc... to automatically clear these files?  This would save backup/restore time, and speed up login.
LVL 5
jlanderson1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dnudelmanCommented:
Select User Configuration->Windows Settings->Internet Explorer Maintenance (right click, and put in Preference Mode), and finally click Advanced. Then choose Internet Settings, then Advanced settings. There should be a setting for Delete Saved Pages when Browser Is Closed.

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

More information and regkeys:

"Internet Explorer URL Action and Advanced Security Settings in Group Policy"
http://technet2.microsoft.com/windowsserver/en/library/c07587ec-4a60-4bca-8508-29a4296b72121033.mspx?mfr=true

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

Empty Temporary Internet Files Folder When Browser is Closed

Preference Key Name:
HKCU\Software \Microsoft\Internet Explorer\Cache \Persistent

Policy Key Name:
Software\Policies \Microsoft\Windows \CurrentVersion \InternetSettings\Cache \Persistent

=======================
0
jlanderson1Author Commented:
How can this be done using Group Policy?  Also, I need their existing cookies and temporary internet files to delete.
0
dnudelmanCommented:
To do it via GPO use:
"Internet Explorer URL Action and Advanced Security Settings in Group Policy"
http://technet2.microsoft.com/windowsserver/en/library/c07587ec-4a60-4bca-8508-29a4296b72121033.mspx?mfr=true

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MidnightOneCommented:
I have this script which is set as a logoff script for all users at client's site. It takes a while to run the first time, and almost nothing thereafter. It's solved a lot of their roaming profile issues.

HAND

MidnightOne


rd "%userprofile%\local settings\temporary internet files\content.ie5" /s/q
rd "%userprofile%\local settings\history\history.ie5" /s/q
del "%userprofile%\cookies\*.*" /s/q/f
del "%temp%\*.*" /s/f/q
del "%tmp%\*.*" /s/f/q

Open in new window

0
kbgsiCommented:
Hello,

Thanks for script, particulary interesting for me in RDS with roaming profile environements.

But in windows 2008R2 / Win7 i think it's better to use %userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\

Regards,

Chris.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.