question

Amilam avatar image
0 Votes"
Amilam asked Amilam commented

Group Policy: Automatically Delete User Profiles Older Than Certain Number of Days Win 10 not working.

Hi

I enabled Computer Configuration\Administrative Templates\System\User Profiles\Delete User Profiles Older Than xxx GPO and apply to Windows 10 PCs.
Dayes set to 90.
Unfortunately, this didn't remove old data folders in C:\user.
I checked the registry HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\System was added the REG_DWORD
I'm using Win 2019 domain and Win 10 client PC's.
Can someone help me to fix this?
The link which I use is https://social.technet.microsoft.com/wiki/contents/articles/28647.group-policy-how-to-automatically-delete-user-profiles-older-than-certain-number-of-days.aspx

Kr,
Amila.

windows-serverwindows-10-generalwindows-server-2019
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

HannahXiong-MSFT avatar image
0 Votes"
HannahXiong-MSFT answered Amilam commented

Hello @Amilam,

Thanks for posting here.

I did the testing in my lab, and below are the findings.

The group policy was configured as shown below.

106946-image.png

106947-image.png

This policy setting allows an administrator to automatically delete user profiles on system restart that have not been used within a specified number of days. Note: One day is interpreted as 24 hours after a specific user profile was accessed.

If you enable this policy setting, the User Profile Service will automatically delete on the next system restart all user profiles on the computer that have not been used within the specified number of days.

So I restarted the system and then checked the folders under C:\Users and User profiles were deleted.

106978-image.png

106948-image.png

Hope it helps. For any question, please post here.

Best regards,
Hannah Xiong



image.png (42.5 KiB)
image.png (54.9 KiB)
image.png (50.4 KiB)
image.png (50.8 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @Amilam,

II have replied to you with the testing carried out by me last week. In my testing, it may need to wait for several minutes and then check the overtime user profiles will be deleted or not. Hope the information will be of some help to you.

For any update or question, welcome to post here. Thanks a lot.


Best regards,
Hannah Xiong

0 Votes 0 ·

Hi @HannahXiong-MSFT,

Thank you for your valuable reply. I checked my environment, User profile data folder (C:\Users\abc) is older than 30 days (last modified date 18/02/2018) but NTUSER.DAT was recently updated.
That is why GPO didn't remove old user profile from the PC. When i check the user profile sign-in tab, user profile modified the same as NTUSER.DAT date.
The same day windows update was installed.

Kr,
Amila.

0 Votes 0 ·