Add a User to an ADAM Group

Adds the user Kenmyer to an ADAM group named Accountants.

VBScript Code


On Error Resume Next

Set objGroup = GetObject _
    ("LDAP://localhost:389/cn=Accountants,ou=Accounting,dc=fabrikam,dc=com")

Set objUser = GetObject _
    ("LDAP://localhost:389/cn=kenmyer,ou=Accounting,dc=fabrikam,dc=com")
objGroup.Add objUser.AdsPath