0

I can create dynamic distribution lists, e.g.

Set-DynamicDistributionGroup -Identity "Atlanta" -RecipientFilter "(Department -eq 'Atlanta')"

which works fine, since each person has only one Department

But my people are also on one or more of about 50 committees, so I'm looking for a way to create a dynamic distribution list for each committee.

Set-DynamicDistributionGroup -Identity "Tech Committee" -RecipientFilter "(Department -like '*Tech*')"

Would seem logical but you can only use a wildcard as a suffix, not as a prefix or in the middle of a search string. What I think I need is to be able to somehow populate an attribute with some kind of list of committees, and then match one in the filter, e.g. (pseudo-code)

user.someattribute = tech committee, pr committee, membership committee
Set-DynamicDistributionGroup -Identity "Tech Committee" -RecipientFilter "(someattribute -contains 'Tech Committee')"

But -contains is also not valid for a -recipientfilter. Is there some clever way to do something like this? There are only 15 Custom Attributes and I considered a special attribute for each committee, but we have 50+ committees. I can add extension attributes all day, but I don't see how they can be used in a -recipientfilter since it is in Exchange.

BrownInTown
  • 43
  • 1
  • 7

1 Answers1

0

Yes, found that dynamic distrubtion lists can look for an item in a custom attribute that has a list of items, thus:

New-DynamicDistributionGroup -Name "Leaders" -DisplayName "Leaders" - 
PrimarySMTPAddress leaders-all@mydomain.net -RecipientFilter " 
(ExtensionCustomAttribute1 -eq \'ldr\')"'

Then, set an attribute like this for each user:

Get-Recipient -identity $User.ObjectID | Set-Mailbox -ExtensionCustomAttribute1 
cipr-leader,cipr,techopswg,wgl,ldr

It seems you must use one of the ExtensionCustomAttributes to be able to do a list like this.

BrownInTown
  • 43
  • 1
  • 7