Exchange 2013 Dynamic Distribution Groups

Hi All,

I have a senario i've been tasked with that i'm trying to find the best approach to.

We're looking to replace some of our Distribution Groups with Dynamic Distribution Group. What i'm trying to accomplish to to target an OU, then filter out Disabled Users, and all users with the AD Description 'TEMP'

I've tried the following in setting up the filtering with no luck, not sure on how to handle disabled users:

New-DynamicDistributionGroup -Name TestDDG -RecipientFilter ((Alias -ne $null) -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Description -like 'TEMP')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'PublicFolderMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'AuditLogMailbox')))


Any advice on how to best approach this would be much appreciated.

Thanks,
Chuck

February 8th, 2015 1:38am

Try the following link.: https://social.technet.microsoft.com/Forums/windowsserver/en-US/00aeef18-6528-42a0-9760-118479bf9a7c/dynamic-distribution-list-exclude-disabled-accounts?forum=winserverpowershell
Free Windows Admin Tool Kit Click here and download it now
February 8th, 2015 4:58am

Hi Chuck,

From your description, you need to filter the users haven't been disabled. You can use the RecipientFilter like this:

-RecipientFilter {((RecipientType -eq 'UserMailbox') ... -and -not(UserAccountControl -like 'AccountDisabled'))}

Hope this can be helpful to you.

Best regards,

If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

February 9th, 2015 4:41am

Thanks! This got me working.
Free Windows Admin Tool Kit Click here and download it now
February 9th, 2015 1:58pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics