Terry Rogers
asked on
Creating a Dynamic Distribution Group by AD Group Membership in Exchange 2010
I am trying to create a dynamic distribution list that uses a recipient filter based up membership of a specific group.
I am issuing the following command at a Exchange Powershell prompt:
The SDL is created without error, and is created in the correct OU within Active Directory. I have to amend the recipient container to point to the correct place to apply the filter (Is there a way to do this as part of the initial powershell command?)
The generated recipients filter looks like:
The Preview button doesn't return any results, and when emailing the SDL there is no error message returned, but the users within the group do not receive any mail.
Any help gratefully received!
I am issuing the following command at a Exchange Powershell prompt:
new-DynamicDistributionGroup -Name 'Test SDL' -OrganizationalUnit 'mydomain.com/Level 1a/Sub Level 2' -Alias 'Test SDL' -RecipientFilter {(MemberOfGroup -eq "CN=My Group,OU=Level 3,OU=Level 2,OU=Level 1,DC=mydomain,DC=com")}
The SDL is created without error, and is created in the correct OU within Active Directory. I have to amend the recipient container to point to the correct place to apply the filter (Is there a way to do this as part of the initial powershell command?)
The generated recipients filter looks like:
((MemberOfGroup -eq 'CN=My Group,OU=Level 3,OU=Level 2,OU=Level 1,DC=mydomain,DC=com') -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox')))
The Preview button doesn't return any results, and when emailing the SDL there is no error message returned, but the users within the group do not receive any mail.
Any help gratefully received!
ASKER
I amended the recipient filter, but this didn't resolve the issue.
When amending MemberofGroup to MemberOf I get the error "Exception setting "RecipientFilter": ""MemberOf" is not a recognized filterable property."
Additionally I don't know how to stop the auto generated recipient filter from adding all the other bits (-and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetails Value -eq 'MailboxPlan')) -and (-not(RecipientTypeDetails Value -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetails Value -eq 'ArbitrationMailbox')))
When amending MemberofGroup to MemberOf I get the error "Exception setting "RecipientFilter": ""MemberOf" is not a recognized filterable property."
Additionally I don't know how to stop the auto generated recipient filter from adding all the other bits (-and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetails
new-DynamicDistributionGro up -Name 'Test SDL 2' -OrganizationalUnit 'mydomain.com/Level 1a/Sub Level 2' -Alias 'Test SDL' -RecipientFilter {(MemberOfGroup -LIKE "CN=My Group,OU=Level 3,OU=Level 2,OU=Level 1,DC=mydomain,DC=com")}
try the above (change from equal to like
try the above (change from equal to like
ASKER
I tried the LIKE version, but this too doesn't work.
new-DynamicDistributionGro up -Name 'Test SDL 3' -Alias 'Test SDL' -RecipientFilter {(MemberOfGroup -eq "CN=My Group,OU=Level 3,OU=Level 2,OU=Level 1,DC=mydomain,DC=com")}
Try this? (I wonder OU and Recipient filter could conflict)
also, do you have result on
Get-Recipient -Filter {(MemberOfGroup -eq "CN=My Group,OU=Level 3,OU=Level 2,OU=Level 1,DC=mydomain,DC=com")}?
Try this? (I wonder OU and Recipient filter could conflict)
also, do you have result on
Get-Recipient -Filter {(MemberOfGroup -eq "CN=My Group,OU=Level 3,OU=Level 2,OU=Level 1,DC=mydomain,DC=com")}?
ASKER
Nether the shorted distribution group, nor the Get-Recipient -Filter yielded any results.
Are there any logs I can look at?
I do have full access to our Exchange environment.
Are there any logs I can look at?
I do have full access to our Exchange environment.
is the group really have users?
we might need to change the way to build this dynamic distribution group
why build against another group? can you use attribute?
we might need to change the way to build this dynamic distribution group
why build against another group? can you use attribute?
ASKER
The group will be managed by several different people so unfortunately is does need to be utilizing the memberofgroup.
Yes, it has one user, myself.
Yes, it has one user, myself.
ASKER
Interestingly I can't seem to get any Custom Filters to work... :/
do you have multiple exchange server / Domain controller?
ASKER
Yep, we have a dozen controllers across a forest containing 3 domains. We then have 6 exchange servers.
Okay. what kind of group is that?
i did some testing that global/universal group is fine but domain local group will not work.
i did some testing that global/universal group is fine but domain local group will not work.
ASKER
Hello, im currently out of the office on annual leave for 2 weeks so wont be able to check these details until my return.
ASKER
Hello, I am back off leave and now catching up. I'll check the group type as soon as I can and update this question shortly.
ASKER
Hi Jian An Lim,
Apologies for the slow replies.
The Group scope is Global and the Group type is Security.
Apologies for the slow replies.
The Group scope is Global and the Group type is Security.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Universal seems to work! Which when you think about it makes more sense, especially in our multi-tiered domain.
I'm in the process of trying a few more tests, but it is looking positive.
I'm in the process of trying a few more tests, but it is looking positive.
Cool. Let me know if you still need any help :)
ASKER
Universal it is, such a simple thing, but I couldn't find anything that pointed to a specific scope requirement.
Thank you Jian An Lim, that was really beginning to bug me! :)
Thank you Jian An Lim, that was really beginning to bug me! :)
a bit of troubleshooting here
change the MemberOfGroup -like 'CN=My Group,OU=Level 3,OU=Level 2,OU=Level 1,DC=mydomain,DC=com'
start by taking off all the others
just do the memberof
(MemberOfGroup -eq 'CN=My Group,OU=Level 3,OU=Level 2,OU=Level 1,DC=mydomain,DC=com')
and see whether it works