PowerShell to prepare for troubleshooting Group Policy after a project has been completed

Ever finished a project and got a phone call within a few days that something was broken… or that someone was stating that it never worked in the first place? And of course no one has modified anything, etc.

I’ve experienced this a couple of times now and in most cases the cause was related to a change in a GPO which the customer made… trust me when I say that things like these can take a lot of time to troubleshoot Bedroefde emoticon

So, nowdays whenever I finish a project I run the following PowerShell code to provide me a with a list of all the group policy objects and the date they’ve been changed for the last time (and some additional info because it may come in hand in the future):

Get-GPO –All | select DisplayName, DomainName, Owner, Id, GpoStatus, ModificationTime | format-table | convertto-html | out-file D:\Temp\GPOObjects-Report.html

Handy, right? Emoticon met brede lach

2 comments

  1. Ashley says:

    Handy!
    However, the script contains a typo. There is a “,” to much after ModificationTime.

  2. Jeff Wouters says:

    Hi Ashley,
    Thanks for the comment, changed the code 🙂
    Jeff.

Leave a Reply

Your email address will not be published. Required fields are marked *