Remove-OrganizationalUnitMember cmdlet removes the specified member from the Organizational Unit.

Input parameters


Mandatory (R/O)

Valid Values
1 Authentication Information (all parameters)  
2 OrgUnitID int R Organizational unit's identifier
3 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:

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

Output parameters

No parameters

Examples of using Remove-OrganizationalUnitMember cmdlet

Removing one member from the OU by DistinguishedName:

Remove-OrganizationalUnitMember -OrgUnitID 50555018 -Member "CN=test@accountname,OU=accountname,OU=Hosting,DC=exchXXX,DC=domain,DC=local"

Removing one member from the OU by GUID:

Remove-OrganizationalUnitMember -OrgUnitID 50555018 -Member "33FDAB33-766F-4D40-94C7-61177BFCAE50"

Removing several members of the OU:

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