Enumerate the groups, check the count of members and delete the ones with a count of zero.
When you as groups in a sharepoint farm I think you are missing how a sharepoint server is built. Groups are not part of the farm but are a part of a sharepoint site or site collection.
I would start by posting in the Sharepoint 20xx forum and asking how to manage groups in a farm and in SharePoint. ONce you learn how to access the farm and its sites you can then get info on how to access users of a sharepoint site.,
Look at the definitions of 'farm' and 'site collection'. Determine what verison of Sharepoint and PowerShell you have and lookup if it is possible to use PowerShell or will you heave to use the Sharepoint utilities.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.