'************************************************** ' ' This script adds a group to the OU passed in. ' To run: cscript addgroup_adam.vbs OU GroupName ' Examples: cscript addgroup_adam.vbs LDAP://localhost:389/ou=testou,c=us MyGroup ' '************************************************** set Args = Wscript.Arguments OUName = Args(0) grpName = Args(1) ' If the application OU DN is "ou=adamou,c=us" and the server is "adamhost" and the port is 389. Then the parameter OUName should be passed ' as follows: "LDAP://adamhost:389/ou=adamou,c=us" Set ou = GetObject( OUName) set grp = ou.Create("group", "cn=" & grpName ) grp.Put "displayName", grpName grp.Put "description", "ADAM test group" grp.SetInfo wscript.echo "Group " & grpName & " was created successfully"