Forum Discussion

Shoga Hailemariam's avatar
Shoga Hailemariam
Copper Contributor
Nov 01, 2018

Exclude a single E-mail from Dynamic distribution Group

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.
  • VasilMichev's avatar
    VasilMichev
    Nov 02, 2018

    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')

Resources