Old user profiles are making life difficult for you. They eat up space, slow down troubleshooting times, and can re-introduce forgotten problems. There are a few ways to handle old profiles. Some will use simply delete them (bad mistake). Others will manually run the tool DelProf. But you, wise reader, prefer the automatic way. That is why you perform user profile cleanup with Group Policy!
How to Delete Old Profiles with Group Policy
Create a new GPO named User Profile Cleanup and edit it. Browse to Computer Configuration\Policies\Administrative Templates\System\User Profiles. Enable Delete User Profiles Older than a Specified Number of Days on System Restart.
The default deletion age for a profile starts at 30 days. You will need to think about your environment and how your computers are used. Do you stored all critical information and documents outside of the user profile (ex: by using folder redirection)? Then you can probably set the deletion value to a lower number such as 14 days.
If you do keep important information in your local profiles, consider how old a profile needs to be before it should be considered obsolete. 90 days might be a more appropriate number for you. If your organization has down time, keep that in mind (ex: School Systems that are off in the Summer).
With your setting enabled, link your GPO. Remote into a few machines and take a snapshot of the Users folder. Check back after the user profile service runs. You should be pleasantly surprised by how clean everything is!
Remember that the user profile service will only clean profiles on a reboot. If your machines never restart, this setting won’t help you. Our next post will cover automatic restarts and why you need them. If you have any questions about this Group Policy setting or on cleaning up machines, leave a comment below.