Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove user from Dynamic Distribution Group

Status
Not open for further replies.

intel233

MIS
Feb 24, 2007
289
0
0
US
I want to remove a person from a Dynamic Distribution group. If the group is ALL NY USERS and the user say John Smith would I do:
Set-DynamicDistributionGroup -Identity JSMITH -RecipientFilter {((RecipientType -eq 'JSMITH@Company.com') -and -not(Name -like 'ALL NY Users'))}
 
I don't think so. Since it is a dynamic group, the membership is always the result of a query. Because of that, you can't just remove him like you are trying to do: you need to redefine the query that creates the distribution group.

It would be more like this:

If the distribution group is called ALL NY USERS and the user group is made up of users who have the Office property set to NYC

Set-DynamicDistributionGroup "ALL NY USERS" -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (Office -eq 'NYC') -and (Name -neq 'John Smith')}

Dave Shackelford
ThirdTier.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top