Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Modify existing exchange 2007 dynamic distribution group

Posted on 2010-09-02
27
Medium Priority
?
1,142 Views
Last Modified: 2012-05-10
How can i modify an existing exchange 2007 dynamic distribution group to include a specific user
I have a group which i want to add a user to
0
Comment
Question by:dougdog
  • 13
  • 11
  • 3
27 Comments
 
LVL 5

Expert Comment

by:rov17
ID: 33587338
0
 

Author Comment

by:dougdog
ID: 33587512
need comands
0
 
LVL 5

Expert Comment

by:rov17
ID: 33587708
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

Author Comment

by:dougdog
ID: 33588446
it is telling me the object cant be found

from the exchange shell im entering

Add-DistributionGroupMember -Identity distributiongroupname -Member 'joe smit'
0
 
LVL 5

Expert Comment

by:rov17
ID: 33592787
Sorry Thursday night, the command is for a normal distribution group not a dynamic one.

The only way is to create a group with those new users in it in the OU and then change the DDG to include groups along with Mailbox's, and the group must be mail-enabled group as shown in the first link

Not sure what are the commands would be in this case.
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33606500
you need to to create the dynamic distribution group to include the mailbox
the following example should create a new DDG created with just a single user with the alias testmbx and everyone with company attribute equal to "Contoso"

New-DynamicDistributionGroup -Name TestDDG -RecipientFilter { ((Alias -eq 'Testmbx') -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_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox'))))) }
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33606527
if your users are not in the default users container you'll also want to add the
-RecipientContainer contoso.com/OUname
0
 

Author Comment

by:dougdog
ID: 33612052
getting a lot of errors when i try to run this
New-DynamicDistributionGroup : Cannot bind parameter 'RecipientFilter' to the target. Exception setting "RecipientFilter": """ is not a valid operator
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33612340
make sure you have -RecipientFilter { (

you need to make sure you have the correct number of () within it
the filter can become complicated

i put my command in the code box below that I used in my lab
New-DynamicDistributionGroup -Name TestDDG -RecipientFilter { ((Alias -eq 'PIT1') -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_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox'))))) }

Open in new window

0
 

Author Comment

by:dougdog
ID: 33616066
when i enter this i get the following

New-DynamicDistributionGroup : Cannot bind parameter 'RecipientFilter' to the target. Exception setting "RecipientFilter": "The value "MailboxPlan" could not be converted to type
Microsoft.Exchange.Data.Directory.Recipient.RecipientTypeDetails."
At line:1 char:60
+ New-DynamicDistributionGroup -Name TestDDG -RecipientFilter  <<<< { ((Alias -eq 'joesmith') -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_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not
(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox'))))) }

can i shorthen the code all i need is to do is create a dynamic distribution group that lists everyone that has the company name as contoso and 1 other individual
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33616723
sorry, i ran it against 2010 which includes that
remove
-and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan'))
0
 
LVL 32

Accepted Solution

by:
endital1097 earned 2000 total points
ID: 33617220
ok, i ran it again in 2007 land and got the same error and more
i adjusted it so it works in 2007

New-DynamicDistributionGroup -Name TestDDG -RecipientFilter { ((Alias -eq 'jd_martin') -or (((((Company -eq 'Contoso') -and (((Reci
pientType -eq 'UserMailbox') -or (((RecipientType -eq 'MailUniversalDistributionGroup') -or (RecipientType -eq 'MailUniversalSecurityGroup')
 -or (RecipientType -eq 'MailNonUniversalGroup') -or (RecipientType -eq 'DynamicDistributionGroup'))))))) -and (-not(Name -like 'SystemMailb
ox{*')) -and (-not(Name -like 'CAS_{*')) ))) }

Name                                                                  ManagedBy
----                                                                  ---------
TestDDG


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

Open in new window

0
 

Author Comment

by:dougdog
ID: 33617388
can i apply this to the whole domain
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33617412
yes, 2007 does not have the recipientcontainer filter
0
 

Author Comment

by:dougdog
ID: 33617461
when i enter the following
New-DynamicDistributionGroup -Name TestDDG -RecipientFilter { ((Alias -eq 'jack.smith') -or (((((Company -eq 'contoso ab') -and (((Reci
pientType -eq 'UserMailbox') -or (((RecipientType -eq 'MailUniversalDistributionGroup') -or (RecipientType -eq 'MailUniversalSecurityGroup')
 -or (RecipientType -eq 'MailNonUniversalGroup') -or (RecipientType -eq 'DynamicDistributionGroup'))))))) -and (-not(Name -like 'SystemMailb
ox{*')) -and (-not(Name -like 'CAS_{*')) ))) }

i dont get any errors now but i just get a >>
0
 
LVL 32

Assisted Solution

by:endital1097
endital1097 earned 2000 total points
ID: 33617492
paste it into notepad and disable word wrap
it should be a single line
once i made it a single line in notepad and pasted it into ems it worked
0
 

Author Comment

by:dougdog
ID: 33617617
thats the job now
will this look through the whole domian or do i need to add the recipient filter
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33617633
that will do the whole domain by default
0
 

Author Comment

by:dougdog
ID: 33617788
perfect
0
 

Author Comment

by:dougdog
ID: 33617839
can the existing group be modified or do i have to create a new one
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33617919
i have never tried to update, but the cmdlet set-dynamicdistributiongroup does allow for modifying this filter
0
 

Author Comment

by:dougdog
ID: 33618158
no prob i will just delete it and re create
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33626090
did this work for you? i was going to test updating an existing ddg today
0
 

Author Comment

by:dougdog
ID: 33628220
i just deleted the old one and recreated it
many thanks
0
 

Author Comment

by:dougdog
ID: 33644819
Actually when i send a test email this does not work
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33645128
you can run the following to verify members
$group = Get-DynamicDistributionGroup "Contoso Users"
Get-Recipient -RecipientPreviewFilter $group.RecipientFilter -OrganizationalUnit $group.RecipientContainer | ft displayName,primarysmtpaddress
0
 

Author Comment

by:dougdog
ID: 33645272
sorry just being stupid i needed to add the correct recipient filter

thanks for coming back to me
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Eseutil Hard Recovery is part of exchange tool and ensures Exchange mailbox data recovery when mailbox gets corrupt due to some problem on Exchange server.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

824 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