Share via

Group Policy Preferences - Replace Folder

MISAdmin 421 Reputation points
2026-01-14T16:27:26.67+00:00

I have a GPP that recreates a folder. It deletes any files or folders within. It just occurred to me that this may be happening every 90 minutes or so. My intention was to do this at logon only. Am I correct that this is happening every 90 minutes and if so, can it be configured to only run at logon?

Windows for business | Windows Server | Directory services | Deploy group policy objects
0 comments No comments

Answer accepted by question author

VPHAN 36,170 Reputation points Independent Advisor
2026-01-14T17:03:36.5266667+00:00

Hello MISAdmin,

You're correct that the Group Policy client processes policies at logon and subsequently refreshes them in the background every 90 minutes (with a randomized offset of 0 to 30 minutes). Because your preference item is configured with the "Recreate" action, the system deletes the target folder and its contents every time this background cycle triggers, which poses a significant risk of data loss while users are working. While the suggestion to use "Apply once and do not reapply" would indeed stop the background deletions, it is likely too restrictive for your needs because it writes a completion flag to the user's registry (under HKCU\Software\Microsoft\Group Policy\History). This prevents the policy from running on any subsequent logon for that user, meaning the folder would only be cleaned once in the user's lifetime, not every session.

To achieve the behavior of cleaning the folder at every logon but preventing it from running during the background refresh, you need to modify the behavior of the Client-Side Extension (CSE) responsible for Folder preferences. Open the Group Policy Object in the editor and navigate to Computer Configuration \ Administrative Templates \ System \ Group Policy. Locate the setting named Configure Folders Preference extension policy processing. Enable this policy and ensure the checkbox Do not apply during periodic background processing is selected.

This configuration instructs the Group Policy engine to ignore Folder preference items during the 90-minute background interval entirely. Consequently, the "Recreate" action will only execute during synchronous foreground processing, specifically when the user logs on, ensuring a clean environment for each session without disrupting the user's workflow later in the day.

I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!

VP

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-01-14T16:28:04.4933333+00:00

    Group Policy Preferences (GPP) do indeed apply settings at user logon and also refresh every 90 minutes by default. If you want a folder to be recreated only at logon and not during the background refresh, you can configure the GPP setting to use the option Apply once and do not reapply. This will ensure that the folder is created only during the initial logon and will not be affected by subsequent refreshes unless the user logs off and logs back on again.

    To set this, go to the GPP configuration for the folder and select the option to apply it once only. This way, it won't delete the contents of the folder during the 90-minute refresh intervals.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.