Getting Windows Events can be painfully slow, but Get-WinEvent and a good filter can really speed things up. Get-GPOEvents.ps1, below, looks for the most recent cycle of user an computer GPO events found in in the Microsoft\Windows\GroupPolicy log. This data can be quite valuable in troubleshooting GPO issues. It works by looking for the user…
Tag: Group Policy
Remotely Execute GPRESULT, and Collect Results
A common program for troubleshooting group policies is gpresult. Get-GPResult_ps1. This interactive script uses WMI to allow the administrator to target an existing user on the remote computer, and then to run either gpresult /h or gpresult /v. The results are written to a temporary file on the remote machine, then displayed when the data…
Getting the Status of a GPO Deployment in an AD Forest
If you are in a large environment, you may be deploying group policies to multiple domains. How can you track the deployment status of the deployment? With Get-GPOdeploymentStatus.ps1, you can enter the name of the GPO, then have all domains queried to discover if it has been installed, who installed it, when it was last…
Clear GPO Cache on Remote Computer with PowerShell
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…