HighTechTalks DotNet Forums  

Active Directory User Account Script form Text file

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss Active Directory User Account Script form Text file in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ambos
 
Posts: n/a

Default Active Directory User Account Script form Text file - 10-26-2004 , 03:55 PM






I’m on the back end of the script. I have a folder on the server called c:\
drive called htmlscores. The folder has a text file called 70scores.txt The
text file has a list of user accounts in Active Directory (Windows 2003) who
have passed the IT Security quiz. They have been put there from the quiz IIS
ASP page when you finish taking the quiz.

This is the format of the text file:

quiztaker1
quiztaker2
quiztaker3

I need to run a vbs script to get the users accounts out of the 70scores.txt
file and associated them with their Active Directory accounts.

This is the script that I have been working on. I don’t know how to get
multiple Active Directory user accounts from the text file into this type of
script below.

Const ADS_PROPERTY_APPEND = 3

Set objUser = GetObject _

("LDAP://cn=quiztaker1,ou=Users,ou=Everett,dc=testnet,dc=co m")

objUser.PutEx ADS_PROPERTY_APPEND, _

"Description", Array("PASSED 1.2005")

objUser.SetInfo

When you run this script it marks their “Description” attribute with the
word “PASSED 1.2005”

(That is the final goal of the backend script.)

Const ADS_PROPERTY_APPEND = 3

Set objUser = GetObject _

("LDAP://cn=variable,ou=Users,ou=Everett,dc=testnet,dc=com" )
objUser.PutEx ADS_PROPERTY_APPEND, _

"Description", Array("PASSED 1.2005")

objUser.SetInfo

It would be ideal if I could run a variable that would get the user accounts
out of the text file and put them one at a time in the path.
Thanks for any help you can provide.


--
Ambos

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.