I’m creating a script to manage contacts and users on Exchange 2010 via Powershell. Especially we try to get all distributiongroups of a contact/user.
Is there a way to get the distribution groups of a contact/user? Perhabs without searching in all distributiongroups?
It can be done by using Get-ADObject using the contact’s guid: