Solved

How can i create a exchange 2007 dynamic distribution group based on a company name and 1 user

Posted on 2010-09-07
4
410 Views
Last Modified: 2012-05-10
How can i create a dynamic distribution group that will pull all users based on the company name in active directory and add 1 extra user to that group sa based on username or alias
0
Comment
Question by:dougdog
  • 2
4 Comments
 
LVL 8

Expert Comment

by:Mkris9
ID: 33616761
http://technet.microsoft.com/en-us/library/bb124268(EXCHG.80).aspx should help in creating the Dist Group based on company. didn't really understand about the extra user. can you explain a bit more pls ?
0
 
LVL 32

Accepted Solution

by:
endital1097 earned 500 total points
ID: 33616817
here is the 2007 version
New-DynamicDistributionGroup -Name TestDDG -RecipientFilter { ((Alias -eq 'jim') -or (((((Company -eq 'Contoso') -and (((RecipientType -eq 'UserMailbox') -or (((RecipientType -eq 'MailUniversalDistributionGroup') -or (RecipientType -eq 'MailUniversalSecurityGroup') -or (RecipientType -eq 'MailNonUniversalGroup') -or (RecipientType -eq 'DynamicDistributionGroup'))))))) -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) ))) }

Open in new window

0
 
LVL 2

Expert Comment

by:tspreeth
ID: 33616824
Try with this command :

New-DynamicDistributionGroup -Name yourDLName -OrganizationalUnit contoso.com/Users -RecipientFilter { ((RecipientType -eq 'UserMailbox')  and (Company -eq 'yourcompanyname')  or (customAttribute1 -eq 'yourvalue')) }
For that one use assumption here is to add customAttribute1 value to 'yourvalue'  .
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33617013
you can then validate the dynamic distribution group

$group = Get-DynamicDistributionGroup testddg
Get-Recipient -RecipientPreviewFilter $group.recipientfilter

Open in new window

0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

679 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