Clearing the GPO cache on a computer may be the only way to fix a persistent problem. Doing this involves deleting files, registry entries, and rebuilding the security database. Clear-GPOCache.ps1 works by creating a custom batch file on the remote computer, then scheduling a task running as System to run the process with the required rights.
There are some interesting code bits, such as getting the remote time for the scheduled task. The task is logged in a text file and in the event log.