1

I'm looking for some sort of setting in group policy management that would allow deletion of the local information of some domain account after it has not been used for some time.

What I mean is, there are publicly accessible computers at the place where I work, where people log in with their domain accounts and every time they do, a local "copy" of their account is created and all of their NAS files imported. Given enough logins, this would use up the storage available after some time. Now what I want to do is to find a setting that would allow the system to automatically "prune" the local copies of the files associated with some account (or the account itself), assuming the user has not logged in on the machine some amount of time (say, a month). Is it possible to set something like this up, I hope the description is not too vague.

1 Answer 1

1

You may set this in the Local Group Policy Editor (gpedit.msc).

Navigate to Computer Configuration > Administrative Templates > System > User Profiles and double-click the policy of "Delete user profiles older than a specified number of days on system restart". Set it to Enabled and specify the number of days.

This policy is described as :

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.

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.

When a user account is deleted, all its data will be removed, including their desktop, downloads, documents, photos, music, and their folder inside C:\Users.

The deletion of an account causes a log-entry to be written to the Event Log with Event ID 4726. This event can trigger a script that you may define, if required, in the Task Scheduler for doing further cleanup.

1
  • Thanks, I'll be sure to try this at work on Monday! Commented Nov 9, 2019 at 14:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .