Creating and Managing Dynamic Distribution Lists

Dynamic Distribution lists our email lists based on a search query instead of static member approval like a standard distribution list. Â Dynamic distribution lists can help lessen administration, and increase accuracy if used properly. Â Your directory structure needs to be clean and concise to be able to accuratly query the members. Â Thanks to Lightwave our directory is just that thanks to our Dayforce integration.
This is just one of many methods you can use to manage them.
*All commands are run in Powershell with administrative rights.
$Filter - This is called a variable... you can associate that variable with a query.
Example: This loads the search query below into the $Filter to be used at a later time.
$Filter = "((Title -eq 'Practice Manager') -or (Title -eq 'Area Manager') -or (Title -eq 'Sr. Director of Operations') -or (Title -eq 'Executive Assistant and Operations Coordinator') -or (Title -eq 'Area Manager') -or (Title -eq 'Regional Director of Operations') -or (Title -eq 'VP of Field Operations'))"
To see your results run the following command below. Â Notice the use of the variable. Â You could place the search string above in the command, but this is much cleaner and accurate.
Get-Recipient -RecipientPreviewFilter $Filter | ft displayname, title
Example Output:
DisplayName      Title
Alicia Bryant     Practice Manager
Ana Della Corte    Practice Manager
Abbey Galati      Practice Manager
Amanda Garthwaite   Sr. Director of Operations
Aleshia Reid      Practice Manager
Alyson Taylor     Practice Manager
Becky Burgess     Practice Manager
Bonnie Heath      Regional Director of Operations
Brittney Lemon     Practice Manager
Bronwyn Orr      Practice Manager
Brittany Price     Practice Manager
Caitlin Russell    Practice Manager
Chaley Borum      Practice Manager
Courtney Goodbar    Regional Director of Operations
Christina Hill     Practice Manager
Cassi Hughes      Practice Manager
Chan'nel Walker    Practice Manager
Celeste Izquierdo   Practice Manager
Callie Jordan     Practice Manager
Christin Lisenby    VP of Field Operations
=================================
Once you are happy with your filter results, you can now turn it into a distribution list.
1. Launch powershell as an admin.
2. Run  Connect-ExchangeOnline
3. Run the following command updating the fields to your preference.
New-DynamicDistributionGroup -Name "DLPM-ALL" -DisplayName "All Practice Managers" -Alias AllPM -PrimarySmtpAddress DLPM-ALL@lightwavedental.com -RecipientFilter $Filter'
4. This will create a new distribution group in Exchange. Â You can login to exchange and view it along with the query.

Good luck and happy querying.