PowerShell function to find orphaned GPT in the SYSVOL

A clean and structured Active Directory is what I always try to work towards.
One of the things I find at many of my customers is a legacy in group policies.
Sometimes it doesn’t seem that bad in the GUI when admins actually removed the GPO’s when they were no longer needed.
But every now and then, a Group Policy Template remains in the SYSVOL although the GPO’s that use it have been deleted…

To find those orphaned GPT’s you can use the following PowerShell function:

Leave a Reply

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