Terminal Server - Delete temp internet files

We have a 2003 terminal server in our domain and I would like to delete all the user's temporary internet files upon their logoff. I Would prefer using a script rather than using a GPO since it would use adm templates, but I'm not 100% sure if a script would be better?
Does someone have a script for this?
Where would the script reside, netlogon folder of the DC?
LVL 7
tolinromeAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
B HConnect With a Mentor Commented:
there is a group policy for it, under windows > terminal server ... it's the same setting i led you to above, just in the GPO instead of the application

rd means remove directory
tempor~1 is shorthand (it works) for "temporary internet files"
/s means go and do every folder under "temporary internet files"
/y means do it and dont ask me to press (Y)es
0
 
B HCommented:
there is a setting for this,
start > programs > administrative tools > terminal server configuration

on the left, settings, empty temp files - set that for yes

you could add a simple batch file to the 'logoff' script area in the group policy > user > security > scripts > logoff

cd %userprofile%
cd locals~1
rd tempor~1 /s /y
0
 
tolinromeAuthor Commented:
I'm not sure if that setting is for all users; I have it enabled already but temp internet files keep growing.

there's no gpo for this?
0
 
tolinromeAuthor Commented:
Also,

What does the /s /y switches mean?
0
All Courses

From novice to tech pro — start learning today.