Permalink
Browse files

Initial commit

  • Loading branch information...
smeggysmeg committed May 8, 2018
1 parent 5b34b7e commit ca9ef168af79470febd6cd6cb80f9cf943ce97b4
Showing with 24 additions and 0 deletions.
  1. +10 −0 GPCacheDelete.cmd
  2. +14 −0 README.md
View
@@ -0,0 +1,10 @@
@echo off
REM GPCacheDelete by smeggysmeg, https://github.com/smeggysmeg/GPCacheDelete
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
echo y | gpupdate /force /wait:0
shutdown -r -f -t 10 -c "Restarting now. Restart again to complete policy refresh"
exit
View
@@ -1,2 +1,16 @@
# GPCacheDelete
Group Policy Cache Deletion
Occasionally, you will have a Windows Active Directory workstation that ignores policy changes and refuses to update its Group Policy settings, even when you try to force the changes. This script solves that by entirely deleting all locally stored policies and downloading them fresh.
This is meant as a troubleshooting tool, and using it on a regular basis may indicate a problem in your Group Policy central store or other aspects of your AD environment.
# Usage
1. Under an account with local administrator privileges, right-click and run as Admnistrator.
2. After the first reboot performed by the script, reboot again to have all policies properly applied.
# Limitations
- In environments where computer restart is completely disabled, you will need to perform it manually through your management tools.
- If you do not have local administrator rights, this will only clear out user policies for the currently signed in user.

0 comments on commit ca9ef16

Please sign in to comment.