General discussion

Locked

Assiging users group membership in AD

By yadavshashi ·
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 = "<GroupDN>" ' e.g. cn=CimUsers,ou=Groups,dc=cim,dc=uu,dc=nl
strMemberDN = "<MemberDN>" ' 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

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by HAL 9000 Moderator In reply to Assiging users group memb ...

One of these links from the MS Knowledge Base should be of assistance to you

http://tinyurl.com/kkss6

http://tinyurl.com/gzrkl

http://tinyurl.com/zxusq

http://tinyurl.com/g6ouq

The bottom Download link here may prove useful as well

http://tinyurl.com/jeef8

Col

Collapse -

by yadavshashi In reply to Assiging users group memb ...

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

Back to Windows Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums