Firstly - Tek-Tips is a very useful site and I appreciate the expert help available.
I have to add about 200 user accounts to a Win2000 server with AD. User data is in an off network data base. It would also be helpful to add sets of users to specific OU's
I have found the script suggested by ShackDaddy on Nov 28 2001. (see below). Is there additional script that will add a user to an OU.
Any suggestion for alternative methods, available utitities, etc??
Thanks
_______________________
Following is the script by ShackDaddy in an answer to a post by vahid_jingil
You can write a command-line script that uses the 'net user' command. Type 'net user /?' at the command-line for options.
A script I wrote to create individual users is as follows. You could edit it to take input from a text file or something.
----------
net users %1 %2 /add /fullname:%3 /domain
net group %4 %1 /add /domain
md \\server1\users\%1
md \\server1\users\%1\exchange
wait 10
rmtshare \\server1\%1$=e:\users\%1
rcmd \\compdc net accounts /sync
wait 50
net users %1 /HOMEDIR:\\athenaserver1:LOGIN.BAT /DOMAIN
cacls \\server1\users\%1 /G Administrator:F %1:F
cacls \\server1\users\%1 /G EVERYONE:R
------------
I name the file something like 'newuser.cmd' and supply it with arguments like 'newuser vahid password1 "Vahid Vajpai" Programming'.
This script:
-creates a user & sets a password
-puts the user in a group
-creates a directory
-shares the directory out
-synchronizes the domain accounts
-sets the home directory and login script
-sets permissions on their home directory
Hope this helps.
ShackDaddy
I have to add about 200 user accounts to a Win2000 server with AD. User data is in an off network data base. It would also be helpful to add sets of users to specific OU's
I have found the script suggested by ShackDaddy on Nov 28 2001. (see below). Is there additional script that will add a user to an OU.
Any suggestion for alternative methods, available utitities, etc??
Thanks
_______________________
Following is the script by ShackDaddy in an answer to a post by vahid_jingil
You can write a command-line script that uses the 'net user' command. Type 'net user /?' at the command-line for options.
A script I wrote to create individual users is as follows. You could edit it to take input from a text file or something.
----------
net users %1 %2 /add /fullname:%3 /domain
net group %4 %1 /add /domain
md \\server1\users\%1
md \\server1\users\%1\exchange
wait 10
rmtshare \\server1\%1$=e:\users\%1
rcmd \\compdc net accounts /sync
wait 50
net users %1 /HOMEDIR:\\athenaserver1:LOGIN.BAT /DOMAIN
cacls \\server1\users\%1 /G Administrator:F %1:F
cacls \\server1\users\%1 /G EVERYONE:R
------------
I name the file something like 'newuser.cmd' and supply it with arguments like 'newuser vahid password1 "Vahid Vajpai" Programming'.
This script:
-creates a user & sets a password
-puts the user in a group
-creates a directory
-shares the directory out
-synchronizes the domain accounts
-sets the home directory and login script
-sets permissions on their home directory
Hope this helps.
ShackDaddy