Cleaning up student profiles on Windows XP machines
In any educational environment there are hundreds of users that can logon to one specific machine . This may cause havoc regarding roaming profiles that are stored on the C: drive. All these profiles stay put in the C:\Documents and settings\%username% folder and may quickly chew up all available disk space. In this article I am going to write down a solution that we are using successfully in our Windows XP environment.
Step 1.
Configure a computer GPO that deletes cached copies of roaming profiles. Place this GPO on a OU that holds your student machines. The policy setting is at Computer Configuration->Policies->Administrative Templates->System->User Profiles->Delete cached copies of Roaming Profiles.
In my experience this is not sufficient. Many folders still remain on the C: drive that should have been removed after the student logs off. Let try to improve this.
Step2.
Install a program called User Profile Hive Cleanup Service on all Windows XP machines. The User Profile Hive Cleanup service helps to ensure user sessions are completely terminated when a user logs off. So it tries to terminate services/processes that keep preventing the folder cleanup after log off. In a live environment this works very good but it will fail if there is a process running that prevents this from happening. Such an process I have seen in our environment was called ati2evxx.exe. An ATI application that created a process that could not be killed by the User Profile Hive Cleanup Service and this resulted in empty profile folder on the C: drive. There are probably more processes that could be found in your environment. So we need an extra thing to configure that deletes these folders as well.
Step3.
We can achieve this by adding another computer GPO setting that runs a shutdown script. You can also do this by setting a startup script but I want to speed up my login procedure as fast as possible so I choose for a shutdown script. There is a fantastic script written by Joe Shonk that can be found here that we need to add to the GPO. The policy setting is at Computer Configuration->Policies->Windows Settings->Scripts (Startup/shutdown)->Shutdown
First copy the script to the NETLOGON share of your domain controller and then configure this GPO. When the XP machine is shutdown manually (or by automatic shutdown) it will invoke this script and the student profile folders will be deleted. Works like a charm.
Extra Notes.
For Vista or Windows 7 environments there is an extra GPO setting that can be used as well. Check out : Computer Configuration->Policies->Administrative Templates->System->User Profiles->Delete user profiles older than a specific date….
I also read on some forums you can just add those users (or student user group) to the LOCAL GUEST buildin group on the XP machine and it will delete all those folders automatically. Use this only if it is not a requirement to save changes to a roaming profile that’s located on a server.
Hope this helps somehow and feel free to comment.
Leave a Reply Cancel reply
SEARCH
CATEGORIES
- Cisco (1)
- Exchange 2003 (2)
- Exchange 2010 (4)
- Forefront TMG 2010 (12)
- Landesk (1)
- Linux (1)
- Scripting (5)
- Windows 2008 (R2) (9)
- Windows 7 (1)
- Wireshark (2)
TAGS
ARCHIVES
- September 2012 (1)
- June 2012 (2)
- October 2011 (1)
- April 2011 (1)
- March 2011 (2)
- February 2011 (5)
- January 2011 (3)
- November 2010 (5)
- October 2010 (4)
CALENDAR
BLOG STATS
- 177,633 hits


Thanks richard, I implelemtned this at a clients. We also had some machines that where not domain members and we managed to create some VBS to remove profiles. For anyone else we referenced
http://www.techieshelp.com/delete-local-profiles/