EXO - Find All Mail Enable Security Groups with a Prefix

Copper Contributor

I need a list of all distributions groups in Exchange Online that has a Mail Enabled Security group that starts with the prefix "MESG-".  I have a Hybrid environment with over 2000 DLs that need to be searched.  I am not a powershell guru so if you can keep it pretty basic that will be GREAT. 

1 Reply
A simple

Get-DistributionGroup MESG-* -ResultSize Unlimited

should do.