Is there a query or powershell command to retrieve a list of AD groups used for permissions in SharePoint sites? We need to find out what groups are being used (actually which ones are not being used) so we can delete unused groups in AD.
You could collect the information by using STSADM -o enumusers command. It will output XML with a list of users (or AD Groups) associated with SharePoint sites. Unfortunatly you have to do this for each site so it might take some time to put together the script to run it.
We looked at a tool from Questto manage security permissions in our sites. One of the features it had was to create a nice list of all users. It might already have functionality you need.