Solved

Deleting Temporary Internet floder on Terminal Server

Posted on 2013-05-25
14
2,040 Views
Last Modified: 2013-06-02
I administer 19 Terminal servers and I've ask users to empty their temporary internet files many times.... but they won't. I want to set a group policy that will empty them every time they exit IE or Firefox. Can someone point me in the right direction?

Also, Some of the temp folders are HUGE (2 Gig) can I just delete the temporary folder from the server for each of these users? Will it be recreated when they restart IE.

Thanks,
Tony
0
Comment
Question by:tonkyman
  • 6
  • 5
  • 2
  • +1
14 Comments
 
LVL 15

Assisted Solution

by:Jaroslav Mraz
Jaroslav Mraz earned 34 total points
ID: 39196653
Hi,

Yes you can simple delete folder it wil recreate :)

And you can instal ccleaner free and make logout policy ccleaner.exe /auto
0
 

Author Comment

by:tonkyman
ID: 39196733
Thanks, I'll work on this over the weekend and see how it goes on Tuesday.
0
 
LVL 50

Assisted Solution

by:jcimarron
jcimarron earned 33 total points
ID: 39196785
tonkyman---
Here is how to use Group Policy to do what you want using Internet Explorer.
http://community.spiceworks.com/how_to/show/34118-delete-temporary-internet-files-on-exit-via-group-policy
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39199926
If you decided to delete them on exit - well, what's the cache good for, anymore?
Better: take a scheduled task that deletes files that are older than a certain amount of days. This can be done easily using delage32.exe or forfiles.exe, the latter being built-in.
Also: there's more to it than just the TIF folder, I could provide a script tomorrow.
0
 
LVL 53

Assisted Solution

by:McKnife
McKnife earned 33 total points
ID: 39200511
dir c:\users /b >%temp%\users.txt
for /f %%a in (%temp%\users.txt) do forfiles /p "c:\users\%%a\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5" /d -14 /S /c "cmd /c del @file /s /q"
for /f %%a in (%temp%\users.txt) do forfiles /p "c:\users\%%a\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5" /d -14 /S /c "cmd /c del @file /s /q"

Open in new window


Using the "delete on close"-function, you will not shoot everything that this script does, for example you won't get what the plugins cache (documents!).
0
 

Author Comment

by:tonkyman
ID: 39201822
McKnife, could you please explain what your script does?

Thanks,
Tony
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39202250
Line 1: lists all users using the directory structure c:\users\ and writes them to %temp%\users.txt
2:  for each user it deletes anything older than 14 days below c:\users\UsernameTakenFromStep1\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5
3 same for ...\Temporary Internet Files\Content.IE5
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:tonkyman
ID: 39202378
McKnife, that is a very slick way of doing it. I've been playing with the individual lines of the scrip since early this morning and I believe this may be the best way to keep the temp internet files in check.

I think I will drop those lines in a batch file and schedule it to run everyday late in the evening. That way I won't have all the extra overhead right at 5 pm when everyone is logging off.

I did have to edit the path to reflect "c:\documents and settings\%%a\Local settings\Temporary Internet Files\Content.IE5" /d -14 /S /c "cmd /c del @file /s /q"

On my 2003 Server I don't have a \Temporary Internet Files\Low\Content.IE5 folder??
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39202420
That paths are found in 2008 server and higher.
0
 

Author Comment

by:tonkyman
ID: 39202492
I should have specified which version of Windows Server I was using.... DUH!!

Anyway! All three of you guys have given me great information and I don't know how to fairly divide the points since I feel all of you have done a great job. How would you guys like me to divide them??

Thank you all so much for the help.

Tony
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39202508
It's up to you. I don't think one should judge the quality of his own solution.
By the way: do you already have forfiles.exe, was it builtin 2003 already? If not, download it from the resource kit or download and use delage32.exe
0
 

Accepted Solution

by:
tonkyman earned 0 total points
ID: 39202548
Mc.. I did have forfiles.exe installed. I make it a point to install the resource kit on all my servers during initial install but I had never even seen forfiles... it's pretty slick.

I always try to take care of the people that help me out because they didn't have to, they chose to. In this case I'll divide the points as fairly as possible.

You guys are good.

Humbly,
Tony
0
 

Author Closing Comment

by:tonkyman
ID: 39214107
All three answers contained useful information and each helped me to formulate a plan for my servers.

The initial answer from JEREMYNO was the immediate help I needed to free up disk space. I was not comfortable using a third party software (ccleaner) and even more so since Server 2003 was not listed as a supported OS.

Ultimately the answers provided by jcimarron and McKnife are the long term solutions to the original "cause" for the question. I will be using the solutions provided both experts in my enterprise environment.

Thanks for the help,
Tony
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 39214498
tonkyman--You are welcome.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PDF links 3 59
Local Webcam passing through windows 2008R2 or 2012R2 Remote Desktop 4 29
Google Chrome Crashes 6 63
Microsoft Office Customization Tool’s Outlook problem 12 78
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
I recently found myself in a Corporate Situation where the client had requested blocking access to any and all websites except his own Domain? Easy? I am sure this would be your answer but their requirement was, this has to be done without using…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now