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!

User Profile after win 2k upgrade

Status
Not open for further replies.

bijo30

MIS
Aug 2, 2002
9
0
0
US
I used a script to change 2 fields in the users profiles on a wi 2k server DC.
the script worked fine except I changed to home directory to \\dc1\home\%USERNAME% that worked but in order to get the enviroment varible to pick up the usersname i have to open eack profile and manually apply it. is there an addition I can make to the script to avoid this.
If so the users home dir already exists which gives a prompt that tells you "the folder alreay exists bla bla bla ..." this needs to be answered in the script as well.
thanks for any help.

Here's the script:

Dim oContainer

Set oContainer=GetObject("LDAP://OU=linden,DC=ywc,DC=com")
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 "homeDirectory","\\dc1\home\%USERNAME%"
oUser.Put "ScriptPath","ywc02.bat"
oUser.SetInfo
Next
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top