All Users exclusion

MistrPC1
MistrPC1 used Ask the Experts™
on
I am trying to setup a "exclusion" to remove people from email that is sent to the "All Users Group"  At my last job, someone had setup a exclusion and we would actually put "notallusers" in the Attribute 15 of their Exchange account and then that would exclude them from getting emails sent out to the All Users Group.   I am trying to enable something like that at my present position.  If anyone can shed some light on what I need to do, it would be greatly appreciated. (We are using Exchange 2013)

Michael
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Will SzymkowskiSenior Solution Architect
Most Valuable Expert 2015
Top Expert 2015

Commented:
Yes using the CustomAttribute (1-15) using a value of your choice and then referencing this in your Filter on the Address List would accomplish that.

Do you have a list of users that you want "excluded" from this AllUsers Address List?

If you do I can create a powershell script that will add the properties to their CustomAttribute and then you just need to update the conditions on the AllUsers AddressList.

Will.

Author

Commented:
I appreciate the help, but if I am going down the same path you are talking about ....I need to:

1. Open Exchange ECP
2. Select Groups
3. Select the All Users Distribution Group
3. Click on Membership
4. Under the heading  "Membership in this group will be determined by the rules you setup below.   Click the "Add Rule" button.
5. Select the Attribute I want  (in this case I will select "Custom Attribute 15"
6. Specify words or phrases and input "notallusers"
7. Save

Then go to the Individual email box I want to be excluded and Under the General tab, go down to Custom Attributes and add "notallusers" in the 15 spot

And this will prevent users from getting any emails that is is sent to the All Users Distribution List?

**note**   I do not have a list as of yet, but I do not think its going to be an extensive list of email addresses

Michael
Will SzymkowskiSenior Solution Architect
Most Valuable Expert 2015
Top Expert 2015

Commented:
You have the correct idea however, are you talking about Dynamic Distribution Groups or Address Lists? When you create these Conditions it is the reverse of what you siad. They are conditions based on WHAT you are trying to find.

Will.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
I am talking about Dynamic Distribution List.  One of the extra "rules" is for  everyone within the OU that houses all of our user.  I need to be able to add the attribute in field 15 for "notallusers" and then go to each email address and put that same attribute in and that user gets exempt from any email sent to the all users distribution list
Will SzymkowskiSenior Solution Architect
Most Valuable Expert 2015
Top Expert 2015

Commented:
You can add this using a script if you have a list of users you want to target, powershell specifcially.

I can assist with that if needed.

Will.

Author

Commented:
Yes sir, your help would be appreciated.

Thank you
Will SzymkowskiSenior Solution Architect
Most Valuable Expert 2015
Top Expert 2015
Commented:
Add your users to a text file, one users per line. Save the text file as c:\users.txt and run the script below...
$Users = Get-content "c:\users.txt"
ForEach ($User in $Users) 
    {
        Set-Mailbox -Identity $User -CustomAttribute15 "notallusers"

}

Open in new window


Will.

Author

Commented:
Wait.....I don't think we are on the same page.  By Adding the "notallusers" to Custom Attribute 15 of a particular email account. That script will prevent them from getting the all users email?   Seems like there needs to be more to this on the actual dynamic distro list???
Will SzymkowskiSenior Solution Architect
Most Valuable Expert 2015
Top Expert 2015

Commented:
You also need to update the conditions as well. I am assiting in the automation of updating the fields required rather than doing them one by one.

Will.

Author

Commented:
So I just add the condition  of notallusers to custom attribute15 on the distro?
Will SzymkowskiSenior Solution Architect
Most Valuable Expert 2015
Top Expert 2015

Commented:
As i stated before when you modify conditions on Distribution Groups you are putting conditions in based on what "you want to FIND" not "what you want to EXCLUDE".

Will.

Author

Commented:
okay.....so where I really need the assistance is the exclusion portion.  With the few amount of email addresses I can add the custom attribute  to them with no issues, but I need the exclusion portion and where to set it
Exchange Experts
Commented:
Ok , Here you go.

1) Create Security Group called "AllStaff_Exclusion_Group" (You need to add members to this group who need to exclude from "all staff" group

2) Open Power Shell and run following command

Set-DynamicDistributionGroup "ALLStaff" -RecipientFilter "(RecipientType -eq 'UserMailbox') -and (MemberOfGroup -ne 'CN=AllStaff_Exclusion_Group,OU=Test,DC=Testing,DC=Com')"

This command will set filter to "ALLSTAFF" Dynamic DistributionGroup to Exclude the AllStaff_Exclusion_Group members

Note : OU=Test,DC=Testing,DC=Com')" (OU=WhereAllStaff_Exclusion_Group is stored and DC=YouDomain,DC=Com"

Note : Replace "ALLSTAFF" with your Dynamic Distribution group

Author

Commented:
Thanks for everyones help.   Sorry about the long reply...I went on vacation.

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