Automatically delete inactive user profiles after a certain number of days

You are probably familiar with the problem that there are still copies of old users on numerous computers in the network who have actually been inactive for a long time or who left the company a long time ago.

This not only makes the list of the local user directory (c: users) long and confusing, it also uses a relatively large amount of hard disk space unnecessarily. Because old, unused user profiles can be large and can quickly occupy a few gigabytes of data.

What is here so closer when one automatism to use, from the network clients automatically all old and automatically delete inactive user profiles . And if you are looking for exactly this, then you should take a closer look at the following group guidelines.

The quickest way to start is by pressing the following key combination

the “gpedit.msc” program to access the local group policies. In the editor you have to change to the following path.

Computer configuration / policies / administrative templates / system / user profiles

There you will find the desired group policy with the name

Delete user profiles that are older than a certain number of days when the system is restarted.

Delete user profiles that are older than a certain number of days when the system is restarted

It is important that you activate this GPO . Only after activating this user profile GPO can you specify the number of days how old the profile must be so that it is automatically deleted when Windows starts .

Microsoft explains this GPO to the user as follows:

This group policy setting enables an administrator to automatically delete the user profiles that are not used within a specified number of days when the system is restarted . Note: A day is equivalent to 24 hours after accessing a specific user profile.

If you enable this policy setting, the User Profile Service will automatically delete any user profiles on the computer that have not been used for a specified number of days the next time the system is restarted .

If you disable or do not configure this policy setting, no profiles are automatically deleted from the User Profile Service the next time the system is restarted .

This user profile GPO makes sense when using a network and should be one of the standard settings in an Active Directory domain . However, the number of inactive days should not be too small. With us the setting of 30 days has proven itself.

In many other articles we have also reported on very interesting GPOs . Here is a selection of them.

– Create a backup of the group policies – Reset
local group
policies completely – Query active group policies with RSOP
– Windows 10 folder names and file names greater than 260 characters
– Switch off drive redirection during an RDP session

– Prevent RDP for local administrators
– Automatically lock Windows after invalid logins
– Switch off Cortana in Windows 10
– Prevent access to control panel in Windows 7
– Allow users to only run certain programs

administrator