Distribution list question

Hi there,

Is the following possible?

We have a distribution list (say call DL1) containing all users in our organisation (about 1000 mailboxes)

And we have a distribution list (say call DL2) containing all users in one particular office (about 400)

I've sent an email to DL2 already.

Now I want to send an email to DL1, but excluding the people in DL2 as they already have the email and I don't want to confuse them.

These are Exchange lists, not Outlook ones.

Thanks


  • Edited by mij2014 Thursday, July 30, 2015 11:51 AM
July 30th, 2015 11:50am

You can use a Dynamic Distribution group to achieve this.

New-DynamicDistributionGroup -Name "DL3" -RecipientFilter {(MemberofGroup -eq "DistinguishedName of DL1") -and (MemberofGroup -ne "DistinguishedName of DL2")}

You just need to get the DistinguishedName of your 2 Distribution Groups by running Get-DistributionGroup.

To verify that the new Dynamic DL filter is correct you can run this in Powershell:

$a = Get-DynamicDistributionGroup "DL3"

Get-Recipient -RecipientPreviewFilter $a.RecipientFilter | select Name,PrimarySmtpAddress | Out-GridView -Wait

Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 5:27pm

Hi there,

Thanks, that looks like that will do what I need it to do.

However after executing my command, Powershell just does nothing. No errors, just 2 arrows with a flashing cursor appears. This is what I typed:

New-DynamicDistributionGroup -name "NewDynamicList" -Organisationalunit "domain/users" -recipientfilter {(memberofgroup -eq "cn=DL1,ou=distribution lists,dc=domain,dc=org") -and (memberofgroup -ne "cn=DL2,ou=distribution lists,dc=domain,dc=org)}

August 5th, 2015 12:33pm

Hi there,

Thanks, that looks like that will do what I need it to do.

However after executing my command, Powershell just does nothing. No errors, just 2 arrows with a flashing cursor appears.

That means that powershell is still waiting for input from you.  Reviewing your cmdlet.
Free Windows Admin Tool Kit Click here and download it now
August 5th, 2015 1:10pm

I tried using the first cmdlet that Corey proposed above, and that worked for me.  Try removing the DL AD object path from your command, leaving just the names of the DLs themselves and try again; it should work.
August 5th, 2015 1:28pm

You're missing a quote after the last distribution list DN  it should be (MemberOfGroup -ne "cn=DL2,ou=distribution lists,dc=domain,dc=org")}

It should also be -OrganizationalUnit

Free Windows Admin Tool Kit Click here and download it now
August 5th, 2015 2:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics