Clicky

I want to create a new Dynamic Distribution Group that will target all individuals at a certain Street Address.

Is this possible?

asked 12/08/2011 06:00

Admin_Stooge's gravatar image

Admin_Stooge ♦♦


9 Answers:
Only if the street address is written to one of the Custom Attribute fields. You can only create Dynamic DGs that are built from a specific OU or using the State, Company, Department, or custom attribute fields.
link

answered

acbrown2010's gravatar image

acbrown2010

So is the Company Address is actually in the AddressTab -> Street: field then its not possible?
link

answered 2011-12-08 at 14:04:47

Admin_Stooge's gravatar image

Admin_Stooge

Not from the EMC, at least. You might be able to do it from the Shell, though, using the new-dynamicdistributiongroup cmdlet with the -recipientfilter switch. I haven't tested this yet, though. http://technet.microsoft.com/en-us/library/bb125127.aspx has info on running the cmdlet. I'll see if I can tinker around with it and get a working command for you.
link

answered 2011-12-08 at 14:07:06

acbrown2010's gravatar image

acbrown2010

The attached code should work for you. It'll add any users that match the address specified to the group.
1:
new-dynamicdistributiongroup -name <name> -alias <alias> -recipientfilter {((recipienttype -eq 'usermailbox) -and (StreetAddress -eq "address"))}
link

answered 2011-12-08 at 14:10:12

acbrown2010's gravatar image

acbrown2010

Watch out for the missing single-quote at the end of 'usermailbox'
link

answered 2011-12-08 at 14:21:42

stefor's gravatar image

stefor

Can you have 2 addresses?  For example:
-recipientfilter {((recipienttype -eq 'usermailbox') -and (StreetAddress -eq "81 Wyman Street") -and (StreetAddress -eq "18 Commerce Way"))}
link

answered 2011-12-08 at 23:55:53

Admin_Stooge's gravatar image

Admin_Stooge

Yes, but the logic gets a little weirder when you start working with more than one street address. Instead of having an -and between the street addresses, you would us a -or and encapsulate the two street addresses with parenthesis, like this:
-recipientfilter {((recipienttype
 -eq 'usermailbox') -and ((StreetAddress -eq "81 Wyman Street") -or (StreetAddress -eq "18 Commerce Way")))}
link

answered 2011-12-12 at 07:01:41

acbrown2010's gravatar image

acbrown2010

That works and one last (hopefully) easy question.

What cmd do I use to export the listed members so I can verify the the query for this new DDG is pulling the correct employees?
link

answered 2011-12-12 at 07:42:49

Admin_Stooge's gravatar image

Admin_Stooge

You can open the properties of the distribution group then click on the filter tab. There's a preview button there that will show you the members that are in the group. You may also need to change the OU that the group is applied to on that tab as well, because it defaults to the default Users Container in AD with just the command above.
link

answered 2011-12-12 at 11:15:40

acbrown2010's gravatar image

acbrown2010

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×1
×3

Asked: 12/08/2011 06:00

Seen: 189 times

Last updated: 12/12/2011 04:11