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

As I am new to Vbscript I may have 1

Status
Not open for further replies.

pytchley

Technical User
Jan 20, 2003
123
GB
As I am new to Vbscript I may have missed the obvious - I can create users in active directory in Windows 2000 server by cobbling the examples in MSDN but cannot find anywhere how to define the home folder using the connect radio button. I would like to use the H: drive to define the users own folder. I am able to pick up the user information from an excel spreadsheet defined in the ODBC.
 
from
1. userconfig "newuser","mydomain","c:\myprofiles\","myscript.cmd","c:\","z:\", & _
#mm/dd/yyyy#,"true"
2.
3. sub userconfig(strUser,strDomain,strProfile,strScript,strHomedir, & _
strHomedirdrive,strAccountexpire,strPassrequired)
4. Dim User
5. Dim Flags
6.
7. Set User = Getobject("WinNT://" & strDomain & "/" & strUser & ",user")
8.
9. User.Profile = strProfile
10. User.LoginScript = strScript
11. User.Homedirectory = strHomedir
12. User.Put("HomeDirDrive"),strHomedirdrive
13. User.AccountExpirationDate = strAccountexpire
14. User.Passwordrequired = strPassrequired
15.
16. Set User = nothing
17. end sub ===============
Security Forums
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top