How to Get List of All Groups in Domain from Command Line - Windows
To get a list of all groups in a domain and export them into a text file, run the following command (you need to have the appropriate permissions to run this command, a domain admin will work):
net group /domain > domain-groups-list.txt
This will export a list of all domain groups into a text file in the working directory. This should work in any Microsoft Windows Active Directory Domain.