Forum Discussion
Create an Office 365 Dynamic Distribution List from members of an Azure AD Security Group
- Mar 25, 2020
What you need to provide for the MemberOfGroup filter is the DistinguishedName of the group, which you can get from Get-Group/Get-DistributionGroup/etc. And yes, it does differ between on-premises and the cloud.
If your group is not mail-enabled though, chances are you will not be able to "see" it with any of the Exchange cmdlets, so that method will not work.
What you need to provide for the MemberOfGroup filter is the DistinguishedName of the group, which you can get from Get-Group/Get-DistributionGroup/etc. And yes, it does differ between on-premises and the cloud.
If your group is not mail-enabled though, chances are you will not be able to "see" it with any of the Exchange cmdlets, so that method will not work.
Get-Group worked. That was the tip I needed! Thanks.
I'll try again with the AzureAD DistinguishedName, and if it still fails, I can make it mail-enabled.
Thanks again.