This post is also available in: Polish
When you have Active Directory Security Group which add permissions to some share or other resources, sometimes you need to send email to all group members to inform about some changes.
You can choose all users from Security Group but what if this group has more than 100 users.
You can create Exchange Dynamic Distribution Group.
When you want to create Exchange Dynamic Distribution Group, and add all members of security group to this dynamic group, it’s not so easy.
You can’t do this using Exchange Management Console.
Because when you want to create dynamic distribution group from Exchange Management Console you can choose Users with Exchange Mailboxes
and when you click Next, on next window you can’t choose members of security group
You can only filter users by 15 Custom Attributes or fields like: Department, Company, State or Province.
So to create dynamic distribution group which will update members from security group you have to use Exchange Management Shell
In Exchange Management Shell with powershell you can do more than in Exchange Management Console.
To create distribution group with name TestDynamic which will include all members of security group Share_Group you need to use New-DynamicDistributionGroup CMDlet like below:
New-DynamicDistributionGroup "TestDynamic" -Alias "TestDynamic" -OrganizationalUnit "OU=Mail Groups,OU=Company,DC=domain,DC=com" -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (MemberOfGroup -eq 'CN=Share_Group,OU=Security Groups,OU=Company,DC=domain,DC=com')}
You will create dynamic distribution group, next to check members of those group you can open EMC, find TestDynamic group, choose Properties, select Filter Tab and click Preview.
Also remember to check what OU is selected on Filter Tab in field “Select the recipient container whre you want to apply this filter”. You should select containter where all users are placed.