Deleting User Profiles from a Windows system could be done through its system properties. This is an easy task when you have few computers to manage but you certainly do not want to do it manually when you manage hundreds or thousands of Windows systems. This Wiki shares how you can easily configure an automatic cleanup of User Profiles older than a certain number of days using Group Policy.
To enable an automatic Cleanup of User Profiles older than a certain number of days using Group Policy, you will need to set the setting Delete user profiles older than a specified number days on system restart under Computer Configuration\Administrative Templates\System\User Profiles to be Enabled and to specify the number of days after which a User Profile can be deleted if it is unused.
The cleanup is done when a system reboot is executed. You have then to be sure that the systems on which this setting is applied are frequently rebooted so that the cleanup is processed as expected.
We have now shared how the cleanup could be enabled. However, your end users might become unhappy because of the automatic cleanup if they are not aware of it. A “smart” way to make your end users aware of the applied cleanup policy is to display a message describing the behavior at each user logon.
To make this true, you can use a Group Policy to update the following registry entries on your Windows systems:
Once this is applied, your users will be informed about the Cleanup policy before they get inside their profile.
Mr X edited Original. Comment: Uploaded the images
Thanks for the article but unfortunately maybe you can add some more information to it?
For me in a RDS environment only ROAMING profiles would benefit from this GPO but it 'cleary' states that this GPO is for all userprofiles so I would count a local profile as well included to be removed.
Question:
* Does this count for ALL profiles residing on a server? Like Local Admin Profile, Domain Admin Profile, Local users Profiles, Roaming Profiles etc.?
Regards,
Arian!
Hi Grimson,
The GPO will remove ALL locally stored profiles (Either the profile is roaming or not) as long as they are inactive for the specified number of days. The removal is processed when the Windows system is rebooted.
Congratulations on the guru award.
Great article.