Reset Group Policy Cache

Here is a custom action that will delete a local workstation’s Group Policy cache. This is useful when a machine gets out of synch with the Domain Controllers and has GPO errors in the event logs. This will work on Windows XP and Windows 7 and it does require psexec.exe.

Custom Action


{actionpath}psexec.exe \\{computer} -u administrator -p YOURLOCALADMINPASSWORD /c {actionpath}DeleteGPOCache.bat



DEL /S /F /Q “%ALLUSERSPROFILE%\Application Data\Microsoft\Group Policy\History\*.*”
gpupdate /force
@echo off
DEL /S /F /Q "%ALLUSERSPROFILE%\Application Data\Microsoft\Group Policy\History\*.*"
REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies /f
REG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies /f
DEL /F /Q C:\WINDOWS\security\Database\secedit.sdb
Klist purge
gpupdate /force

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: