Exclude a single E-mail from Dynamic distribution Group

%3CLINGO-SUB%20id%3D%22lingo-sub-281390%22%20slang%3D%22en-US%22%3EExclude%20a%20single%20E-mail%20from%20Dynamic%20distribution%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-281390%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EI'm%20trying%20to%20find%20the%20exact%20command%20to%20use%20in%20PowerShell%20to%20remove%20a%20user%20from%20a%20dynamic%20distribution%20l.%26nbsp%3B%20Can%20someone%20point%20me%20in%20the%20right%20direction%3F%20Thanks%20in%20advance.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-281390%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Groups%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286055%22%20slang%3D%22en-US%22%3ERe%3A%20Exclude%20a%20single%20E-mail%20from%20Dynamic%20distribution%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286055%22%20slang%3D%22en-US%22%3E%3CP%3EWorks%20just%20fine%20for%20me%2C%20in%20fact%20almost%20all%20of%20the%20DDGs%20I%20have%20include%20the%20not%20clause%20in%20some%20form%20in%20their%20recipient%20filter.%20If%20you%20share%20the%20filter%20you%20tried%20to%20use%2C%20we%20might%20be%20able%20to%20give%20you%20a%20pointer.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286032%22%20slang%3D%22en-US%22%3ERe%3A%20Exclude%20a%20single%20E-mail%20from%20Dynamic%20distribution%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286032%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20doesn't%20work%20but%20thank%20you%20for%20your%20suggestion%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286031%22%20slang%3D%22en-US%22%3ERe%3A%20Exclude%20a%20single%20E-mail%20from%20Dynamic%20distribution%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286031%22%20slang%3D%22en-US%22%3EThank%20you%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-281596%22%20slang%3D%22en-US%22%3ERe%3A%20Exclude%20a%20single%20E-mail%20from%20Dynamic%20distribution%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-281596%22%20slang%3D%22en-US%22%3EDuh....%20didn%E2%80%99t%20think%20you%20could%20reference%20name%20field%20but%20been%20a%20long%20time%20since%20messing%20with%20dynamic%20groups.%20Would%20make%20sense%20that%20you%20should%20be%20able%20to%20use%20any%20ad%20field.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-281514%22%20slang%3D%22en-US%22%3ERe%3A%20Exclude%20a%20single%20E-mail%20from%20Dynamic%20distribution%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-281514%22%20slang%3D%22en-US%22%3E%3CP%3EOr%2C%20simply%20use%20the%20*not*%20clause%20in%20your%20existing%20recipient%20filter%2C%20no%20need%20to%20add%20any%20complexity.%20Here's%20an%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E((UsageLocation%20-eq%20'Bulgaria')%20-and%20(Name%20-ne%20'vasil'))%3C%2FP%3E%0A%3CP%3Eor%3C%2FP%3E%0A%3CP%3E-not(RecipientTypeDetails%20-eq%20'SharedMailbox')%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-281462%22%20slang%3D%22en-US%22%3ERe%3A%20Exclude%20a%20single%20E-mail%20from%20Dynamic%20distribution%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-281462%22%20slang%3D%22en-US%22%3EThere%20isn%E2%80%99t%20an%20exclude%20filter.%20You%20can%20move%20that%20person%20to%20a%20different%20OU%20and%20not%20include%20that%20in%20the%20OU%20filter%20or%20get%20fancy%20with%20the%20recipient%20filter%20by%20making%20use%20of%20custom%20fields%20or%20fields%20that%20everyone%20is%20in%20but%20not%20that%20person.%20So%20if%20the%20group%20is%20created%20off%20city%20or%20department%20you%20could%20remove%20their%20department%20or%20add%20a%20space%20or%20something%20to%20it%20so%20it%20doesn%E2%80%99t%20match%20and%20pick%20up.%20But%20depending%20if%20you%20have%20some%20other%20questions%20using%20these%20fields%20might%20not%20be%20an%20option.%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I'm trying to find the exact command to use in PowerShell to remove a user from a dynamic distribution l.  Can someone point me in the right direction? Thanks in advance.

6 Replies
Highlighted
There isn’t an exclude filter. You can move that person to a different OU and not include that in the OU filter or get fancy with the recipient filter by making use of custom fields or fields that everyone is in but not that person. So if the group is created off city or department you could remove their department or add a space or something to it so it doesn’t match and pick up. But depending if you have some other questions using these fields might not be an option.
Highlighted

Or, simply use the *not* clause in your existing recipient filter, no need to add any complexity. Here's an example:

 

((UsageLocation -eq 'Bulgaria') -and (Name -ne 'vasil'))

or

-not(RecipientTypeDetails -eq 'SharedMailbox')

Highlighted
Duh.... didn’t think you could reference name field but been a long time since messing with dynamic groups. Would make sense that you should be able to use any ad field.
Highlighted
Highlighted

This doesn't work but thank you for your suggestion

Highlighted

Works just fine for me, in fact almost all of the DDGs I have include the not clause in some form in their recipient filter. If you share the filter you tried to use, we might be able to give you a pointer.