How can I create a distribution group based on mail database?

jdouthit used Ask the Experts™
I have created a new mailbox database in Exchange 2007.  I have moved 200+ users over to this database.  How do I create a dynamic distribution group based off of mailbox database?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Rick FeeMessaging Engineer - Disaster Recovery Engineer

Only way I can think of is create a powershell script to modify all the users in the mbxdb and set a custom Attribute to them and then create the DDistro with a condition to hit on that custom attribute.
Solutions Architect
get-mailboxdatabase dbname | fl DistinguishedName

copy it

New-DynamicDistributionGroup -Name DDGName -RecipientFilter {Database -eq "Value Copied Above"}

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial