Forum Discussion

Rob_Lam's avatar
Rob_Lam
Brass Contributor
Aug 22, 2024

Setup Dynamic Distribution list based on City Name

Hi

 

I just want to create two dynamic distribution list 

 

For the first distribution list , if the user based in a city called Auckland the user is moved to the distribution list.

I also want another distribution list called "all staff" and anyone new and existing users will be added to the distribution list.

 

I'm reading this https://learn.microsoft.com/en-us/exchange/recipients/mailbox-custom-attributes?view=exchserver-2019 and I'm very lost

 

Is there a quick way of doing this?

3 Replies

  • You can use something like this:

    New-DynamicDistributionGroup Auckland -RecipientFilter {City -eq 'Auckland'}

    For the "all staff" scenario, you have to come up with a suitable rule, as there are many corner cases to consider. For example, you can have a DDG with all mailboxes, but that will include shared/room mailboxes as well. Then there's the question of whether disabled users should be included, and even what "staff" is...

Resources