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 |