Creating a dynamic distribution group in Exchange 2010 using the EX shell

Posted on 2011-04-26
Last Modified: 2012-05-11
I need help with the syntax of creating a new dynamic distro group using the Exchange shell.

I have users who are in specific offices, so I use the "Office" field to designate their office.
I need to create various distro groups based on their office.

Using this: I get all users in a specific office:
Get-Mailbox -Filter {Office -eq 'New York'}

Now, what I want to do is create a distro group called "NY" for example that contains all users in  the Office of 'New York".
I have tried this in several different ways but it's not working:
New-DynamicDistributionGroup -Name "NY"  -Filter {Office -eq 'New York'}

Can anyone tell me how to do this?
Question by:nachtmsk
    LVL 34

    Expert Comment

    by:Shreedhar Ette

    Author Comment

    Thanks. I was already looking at the article. I was asking for more specific help.
    LVL 12

    Accepted Solution

    did you put each office on seperate OU, if so you just specifiy the OU

    New-DynamicDistributionGroup -IncludedRecipients MailboxUsers -Name "NY DDG" -OrganizationalUnit NYOffice

    If not I think you can use -RecipientFilter  parameter not -filter

    Featured Post

    Want to promote your upcoming event?

    Is your company attending an event or exhibiting at a trade show soon? Are you speaking at a conference? Spread the word by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

    Join & Write a Comment

    In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
    The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

    728 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

    21 Experts available now in Live!

    Get 1:1 Help Now