Add-OrganizationalUnitMember cmdlet adds a member to the Organizational Unit.

Input parameters

#
Parameter
Type

Mandatory (R/O)

Description
Valid Values
1 Authentication Information (all parameters)  
2 OrgUnitID int R Organizational unit's identifier
3 Member

(alias:Members)

ADObjectIDParameter R A property, that is used for managing the user

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

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

Output parameters

No parameters

Examples of using Add-OrganizationalUnitMember cmdlet

Adding one member to the OU by DistinguishedName:

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

Adding one member to the OU by GUID:

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

Adding several members to the OU:

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