Remove-DistributionGroupMember cmdlet removes the specified member from the distribution group (list).

This cmdlet supports risk-mitigation parameters.

Input parameters

#
Parameter
Type

Mandatory (R/O)

Description
Valid Values
1 Authentication Information (all parameters)  
2

Identity

(aliases: GUID, DistinguishedName)

ADObjectIDParameter R

A property that is used for managing the members of the distribution group (list)

Value of one of these parameters can be used as Identity:

#ParameterDescription
1 GUID Globally Unique Identifier (ObjectGuid)
2 DistinguishedName Unique name of the object in Active Directory
3

Member

(alias: Members)

ADObjectIDParameter[] R

Identity of the member(s), which will be removed from the distribution group

(possible members: mailboxes, mail contacts, distribution lists, etc.)

Value of one of these parameters can be used as member's identity:

  • GUID
  • DistinguishedName

Output parameters

No parameters

Examples of using Remove-DistributionGroupMember cmdlet

Removing one member from the distribution group (list) by DistinguishedName:

Remove-DistributionGroupMember -Identity "CN=DLName@accountname,OU=accountname,OU=Hosting,DC=exchXXX,DC=domain,DC=local" -Member "CN=test@accountname,OU=accountname,OU=Hosting,DC=exchXXX,DC=domain,DC=local"

Removing one member from the distribution group (list) by GUID:

Remove-DistributionGroupMember -Identity "CN=DLName@accountname,OU=accountname,OU=Hosting,DC=exchXXX,DC=domain,DC=local" -Member "33FDAB33-766F-4D40-94C7-61177BFCAE50"

Removing several members of the distribution group (list) :

Remove-DistributionGroupMember -Identity "CN=DLName@accountname,OU=accountname,OU=Hosting,DC=exchXXX,DC=domain,DC=local" -Members "CN=test@accountname,OU=accountname,OU=Hosting,DC=exchXXX,DC=domain,DC=local","87C213E7-ACE7-43DE-8D06-D75101CD621C