Discussion Locked

Assiging users group membership in AD

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hallo again,

I am sure there are script gurus those who can help me out, I did try by my own to make a simple script to add a users to a group but it does not work. Well it?s a simple command:
objGroup.Add("LDAP://cn=SueP10,cn=vsnu,cn=users,dc=vsnu,dc=uu,dc=nl")

Does it matter if it?s a security or distribution group?
I find this script on internet:
strGroupDN = "" ' e.g. cn=CimUsers,ou=Groups,dc=cim,dc=uu,dc=nl
strMemberDN = "" ' e.g. cn=jsmith101,cn=users,dc=cim,dc=uu,dc=nl
' ------ END CONFIGURATION ---------

set objGroup = GetObject("LDAP://" & strGroupDN)
' Add a member
objGroup.Add("LDAP://" & strMemberDN)
--------------------------------------------
Please advice first part is a file with users and group and the second is a script. Or it?s a single script. For each group I need to create separate script, can I have more than one user in "strMemberDN"?
It is not working, what is wrong in this picture.
Please help.
Thank you.

Shashi

2 replies

by yadavshashi

Well the situation is like this University has its AD. Each student and employees gets new user id. Each faculty gets an OU there they should keep their own stuff. We have to dismantle our NT domains migrate our member server to AD. We get admin rights on our ou only. These new users should be added to old groups. I am not an administrator so I can not use any tool which needs admin rights. The plan is create all the groups and add new users to the group. The membership should correspond to old situation (NT domain). So what I am looking for is a script where you give group name and the members name and run the script. And the users become member of that group. The above code gives errors. Please advice.
Shashi

This discussion is closed to new replies.