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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBscript & Active Directory

Status
Not open for further replies.

ecraig

MIS
Jun 14, 2001
22
0
0
US
I have got the following script:

Set oContainer = GetObject("LDAP://OU=junior,OU=PHS

Students,DC=harvester,DC=pampaisd,DC=net")

ModifyUsers oContainer

'cleanup

Set oContainer = Nothing

WScript.Echo "Finished"

Sub ModifyUsers(oObject)

Dim oUser

oObject.Filter = Array("user")

For Each oUser in oObject

oUser.Put "scriptPath","student.bat"

oUser.Put "homeDrive","X"

oUser.Put "homeDirectory","\\phslib\%username%"

oUser.SetInfo

Next

End Sub

I need to have the homeDirectory line place the username after "\\phslib\USERNAME HERE??". What do I need to add to this script in order to accomplish this. I am fairly new to VB Scripting so I don't alot of the command. Thank you.
 
oUser.Put "homeDriectory", "\\phslib\" & oUser.samaccountname

This should work for you.

Chucksters
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top