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 19 hours 38 minutes ago
July 30th, 2015 7:55am

Hello

you can create a distribution group DL3, and add members using the shell command to exclude the members already in DL2. Create a list of users which are not in DL2 but are in DL1.

Try below cmdlet to import from CSV file...

Import-CSV FileName.csv | ForEach {Add-DistributionGroupMember -Identity "DL3" -Member $_.Name}

In filename.csv file should have a column Name and the values must be in anyone of below format to add them as a member... GUID distinguished name UPN LegacyExchangeDN Domain\Account Name SMTP Address


Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 10:21am

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

July 30th, 2015 1:32pm

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

Other recent topics Other recent topics