Built in Microsoft AD tool DSADD. Works perfectly once you have an excel template set-up then it's just copy and paste to a dos prompt
You'll need to do that with a script, then use NTFSFix to set the permissions. That's the reason I dropped AUM, it took several times longer to use for me than AM.
Edit: you'll also need to set ownership for the folders for the FSRM. I have a script for this, place a copy of chown.exe in the main user folder, with this script:
Code:rem sets permission on all files according to home directory name, place this and chown.exe into the \userfolders folder then run it. for /D %%i in (*) do ( chown -r %%i "%%i\*.*" )
Last edited by 3s-gtech; 9th July 2010 at 09:59 AM.
Just create a batch file with the md command and run that in the folder you want to create your directories in. Then run calcs to assign the permissions on the folders.
have my own wsh script but i have to manually create the userareas with xcacls and rmtshare. if you have the foldernames the same as the usernames it's easy.
create folders from a list of usernames
for /f %a in ('type usernames.csv') do mkdir %a
then for xcalcs and rmtshare operations you just have to do
for /f %a in ('dir *. /b') do whatever %a
i have to modify it this year to included registration numbers in an arbitrary ad field as matching ad data to sims data is a manual job in excel at the moment.
Last edited by browolf; 9th July 2010 at 10:11 AM.
Here's one version of the scripts I used to use, not the last one because I couldn't find it.
I probably deleted the latest version when we bought XIA Automation.
Should go without saying but I'll say it anyway: you use / modify these scripts at your own risk.
makeusers_dsaddCode:@echo off if "%1" == "" goto instruct if "%1" == "/?" goto instruct if not exist "%1" goto end :start setlocal for /f "skip=1 delims=, tokens=1,2,3" %%i in (%1) do ( call makeusers_dsadd.bat %%i %%j %%k DoIt ) goto end :instruct cls echo Usage: echo makeusers [drive:\path\filename] echo [filename] must refer to a comma separated value file. echo, echo The CSV file must contain: echo One blank line at the top then on each following line forname,surname,username. echo If you want the username to be auto-generated enter the username as ZZZ. echo, echo Requirements: echo RCMD access to the server that the Home Directories are located on. echo W2K Resource Kit commands XCACLS RCMD be available in the path. echo Must run on XP Pro or W2K3 server (for DSADD and DSQUERY). goto end :end
Code:@echo off setlocal REM Check the Home Directory Path! net use x: \\FP3\d$ set hdd=X: set hdp=\users\2007intake\ set svrhdd=D: set svrhdp=\users\2007intake\ if not exist "%hdd%%hdp%." goto errorhdp REM Check this has been called correctly if not "%4" == "DoIt" goto end if "%3" == "ZZZ" goto create_samid set c_samid=%3 goto doit :create_samid set init=%1 set c_samid=07%2%init:~0,1% :doit for /f "delims=^^^" %%l in ('dsquery user -samid %c_samid%') do goto error for /f "delims=^^^" %%l in ('dsquery user -name "%1 %2"') do goto error %hdd% cd "%hdp%" md "%c_samid%" "c:\program files\resource kit\rcmd\rcmd" \\FP3 c:\winnt\system32\net share %c_samid%$="%svrhdd%%svrhdp%%c_samid%" /UNLIMITED /GRANT:Everyone,FULL /CACHE:NO /REMARK:"%c_samid%'s Home Directory" dsadd user "CN=%1 %2,OU=2007,DC=st-thomasmore,DC=walsall,DC=gov,DC=uk" -fn %1 -ln %2 -samid %c_samid% -display "%1 %2" -pwd 123456 -upn %email@example.com -profile \\FP3\profiles$\%c_samid% -loscr curric.bat -hmdir \\FP3\%c_samid%$ -hmdrv h: -memberof "CN=07Accounts,OU=2007,DC=st-thomasmore,DC=walsall,DC=gov,DC=uk" "C:\Program Files\Resource Kit\xcacls.exe" "%hdd%%hdp%%c_samid%" /Y /P administrators:F :redo "C:\Program Files\Resource Kit\xcacls.exe" "%hdd%%hdp%%c_samid%" /E /G %c_samid%:F if errorlevel 1 goto redo "C:\Program Files\Resource Kit\xcacls.exe" "%hdd%%hdp%%c_samid%" /E /G "Full Control to Pupils Home Directories:F" goto end :error echo %1 %2 common name or %c_samid% alread exists!>>error.txt echo %1 %2 common name or %c_samid% alread exists! goto end :errorhdp echo Home Directory Path Invalid! goto end :end
Dovestones tools here as well excellent for the price.
Mainly the user creation one tbh but's it's so easy to use plus their support is great for any queries.
Personally I would not trade XIA Automation for the Dovestones tools (based on a quick perusal of the Dovestones tools). XIA Automation is not as cheap (it's ~Ł250 IIRC) but it's potential for automating so much more is immense.
You should not need to create users folders, if you specify their user home folder when creating a user it should do it automatically if your permissions are set right. DSADD as mentioned or a utility from MS called addusers.exe will do the job easily and at no cost.
AWicher (16th July 2010)
+1 for dovestones here
we use xia automation in all of our 65 schools. excellent support too.
edit: Ooops, didn't realise I'd already replied in this thread.
Last edited by box_l; 12th July 2010 at 08:27 PM.
I use ad-infinitum to create bulk users, such as in the new year or when setting up a new server. It's a great bit of software.
There are currently 1 users browsing this thread. (0 members and 1 guests)