Solved

Office 365 dynamic distribution list

Posted on 2016-07-21
7
27 Views
Last Modified: 2016-08-22
My company has several domains registered with Office 365. I need to create distribution lists for each domain that includes all users for that domain (i.e. all@domain1.com, all@domain2.com, etc.). I would like the list to be dynamically updated so that we aren't manually adding users to the list every time an account is created. Is this possible?
0
Comment
Question by:Christopher Perry
  • 3
  • 2
  • 2
7 Comments
 
LVL 79

Expert Comment

by:David Johnson, CD, MVP
ID: 41724041
Dynamic Distributuion Group
1
 

Author Comment

by:Christopher Perry
ID: 41724043
David, wouldn't this solution require manually defining the "Custom attribute 1" value for every user upon creation?
0
 
LVL 39

Expert Comment

by:Vasil Michev (MVP)
ID: 41724047
Should be possible via something like this:

Set-DynamicDistributionGroup domain -RecipientFilter {((Alias -ne $null) -and (UserPrincipalName -like "*@domain.com"))}

However, it will error out saying wildcards are not allowed. While the same syntax will work perfectly fine for address lists. I've asked the team to clarify on this...

If it turns out wildcards are not supported indeed, your other option is to populate some of the extension attributes and filter on those. However, it's pretty much the same as adding all mathing users manually to a DG, so not really a solution here.
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 79

Expert Comment

by:David Johnson, CD, MVP
ID: 41724070
Yes since I only want 1 domain in that DDG when I create it otherwise it will apply to all domains. Once created it just works
0
 
LVL 39

Accepted Solution

by:
Vasil Michev (MVP) earned 500 total points (awarded by participants)
ID: 41725559
Unfortunately, this is by design - you cannot use leading wildcards in EO. Here's the documentation on it:

The RecipientFilter parameter specifies an OPath filter that's based on the value of any available recipient property. You can use any available Windows PowerShell operator, and wildcards and partial matches are supported. When you use this parameter, remember the following OPath filter rules:


Use braces { } around the whole OPath syntax string.


Include a hyphen before all operators.


In cloud-based environments, you can't use a wildcard as the the first character. For example, Sales* is allowed, but *Sales isn’t allowed.

https://technet.microsoft.com/en-us/library/bb125127(v=exchg.160).aspx
0
 

Author Comment

by:Christopher Perry
ID: 41730566
Vasil,

You confirmed my fear... I'm going to mark your answer as correct if I don't hear any other solutions in the next 48 hours.

Thank you!
0
 
LVL 79

Expert Comment

by:David Johnson, CD, MVP
ID: 41756098
Asker was going to accept and then come back
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to install and use the NTBackup utility that comes with Windows Server.
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now