[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2280
  • Last Modified:

exclude a mailbox from a dynamic distribution list

Hello,

i need to exclude one mailbox from a dynamic distribution list.
this dynamic distribution list select all user in specific Organisationnel unit.
i cannot move the user from this OU.
i think, a powershell command can help me to exclude the user from this dynamic distribution list for exemple with a condition on custom attribute 1 = nomember.

thanks for your help
0
cawasaki
Asked:
cawasaki
  • 2
1 Solution
 
suriyaehnopCommented:
I think you have already have an answer. One thing you can do is to set the custom attribute of the user, say set the custome attribute no.1 to Not Member then you change/re-create the dynamic query a little with include user at OU but not custom attribute no.1
0
 
cawasakiAuthor Commented:
hi, yes but i need a correct powershell command :)
0
 
suriyaehnopCommented:
I think it is better you do this way, for user who will member of this Dynamic will have a custom attribute set say 1


Exchange Management Shell command completed:
new-DynamicDistributionGroup -Name 'DL Test OU' -RecipientContainer 'cpadm001.local/Test OU' -IncludedRecipients 'MailboxUsers' -ConditionalCustomAttribute1 'TN' -OrganizationalUnit 'cpadm001.local/Test OU' -Alias 'DL_Test_OU'

How to modify existing Dynamic group:

Set-DynamicDistributionGroup -ConditionalCustomAttribute1 'TN','SN' -Identity 'cpadm001.local/Test OU/DL Test OU'
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now