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

The Script

Amend the Export-Csv path as required.

Import-Module activedirectory
Get-ADGroup -Filter * -Properties Members | Where {-not $_.members} | select Name | Export-Csv D:\EmptyADGroups.csv –NoTypeInformation

Alternative VBS Method

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