set xfold=F:\Labs\Firstyearlab
set xname=%1
net user %xname% new@123 /add
md %xfold%\%xname%
rmtshare \\servername\%xname%$=%xfold%\%xname% /USERS:1 /GRANT Administrator:F /GRANT %xname%:C
echo Y |cacls %xfold%\%xname% /E /R Everyone /P Administrator:F %xname%:C
save the above line to create a bat file "netuser.bat"
repeated user creation use the following line
for %%i in (1 2 3 4 5 6 7 8 9 ) do netuser ebinet0%%i
for %%i in (10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60) do netuser ebinet%%i
save the above line to create a bat file "netuser.bat"
repeated user creation use the following line
for %%i in (1 2 3 4 5 6 7 8 9 ) do netuser ebinet0%%i
for %%i in (10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60) do netuser ebinet%%i
No comments:
Post a Comment