Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBS Server help 1

Status
Not open for further replies.

matty1404

MIS
Feb 12, 2007
74
US
I am trying to write a script that after I creat a simple user in active directory will put them in the groups I want them in. I am having trouble figuring out what is what. I have some sample script from microsoft and I dont know what two thins mean. First is the OU. I know it means organizational unit, but where do I find that? Also what user name do they mean. Do they want the name that the user will logon with or the full name??

This is the code I am working with. This is all from microsoft so if you could tell me where I need to put my stuff in that would be great. Thanks

Const ADS_PROPERTY_APPEND = 3

Set objGroup = GetObject _
("LDAP://cn=Atl-Users,cn=Users,dc=NA,dc=fabrikam,dc=com")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=MyerKen,ou=Management,dc=NA,dc=fabrikam,dc=com")
objGroup.SetInfo


 
This is the distinguished name of the group:
cn=Atl-Users,cn=Users,dc=NA,dc=fabrikam,dc=com

This is the distinguished name of the user:
cn=MyerKen,ou=Management,dc=NA,dc=fabrikam,dc=com

You can retrieve both of these pieces of information using the ADSI edit tool which comes with the Win2k3 support tools. You add it as a snap-in to an MMC console.

You can also retrieve this information form a AD query for the user.
--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Thanks, that helped a lot. What is the command for a new line in vbs??
 
VbCrLf or vbNewLine

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top