PowerShell oneliner to find empty groups in Active Directory

This one goes in the category of a ‘nice & clean’ environment, specifically your Active Directory.

And to just get the names, simply pipe it to Select-Object and only select the ‘Name’ property.

Note: Go through the list before you’ll delete them. There may be default groups in there aswell as the groups may be in use in other products. So: Think before you act!

Leave a Reply

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