Pre-requisites

Before you can use the Active Directory Cmdlets you will either need the to install the RSAT tools or run the below PowerShell on on Domain Controller. You can read more about  Active Directory Administration with Windows PowerShell here https://technet.microsoft.com/en-us/library/dd378937(WS.10).aspx

The Script

Amend the Export-Csv path as required.

Alternative VBS Method

If you would prefer to use VBS take a look at the below link for an alternative method.

VBS Script to find all empty AD groups in the current domain