When it comes up cleaning up user profiles on Windows 7, you can either do it manually through System Properties or use a tool called Delprof2. But here is a group policy setting that can automate the process.
Group policy name: Delete user profiles older than a specified number of days on system restart
Where to locate: Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> User Profile
Double click the setting, check the option Enabled, and pick a day from the list. OK to apply the settings.
Once the setting is enabled and is in place. All old user profiles that are older than the days specified in the group policy setting will be automatically deleted on system restart.
Not that you need to have local admin rights in order to perform this task. It’s a heck of very useful setting for those who need to maintain many workstations in a local network.
This useful group policy setting was first introduced in Vista, but on Vista, make sure you have the latest service pack installed before applying this setting.