Forum Discussion
Mark Louie Diaz
Aug 29, 2018Copper Contributor
Get mailcontact if member of any group
Hi Tech Community, May I ask how can I accomplish the subject? I want to know before removing a mail contact if it is a member of a Distribution group. Best Regards, Mark
Clint Oliveira
Aug 29, 2018Brass Contributor
You would need a script that cycles through all the distribution groups and members within them and list the groups that a particular member is a part of. I got this task back in the days. you can use this script to check if a user is a part of a distribution group.
https://gallery.technet.microsoft.com/scriptcenter/Get-Distribution-lists-2ceda593:
https://gallery.technet.microsoft.com/scriptcenter/Get-Distribution-lists-2ceda593