Create Home Dirs

  • Thread starter Thread starter ChrisB
  • Start date Start date
C

ChrisB

We are already authenticating to the AD. Now I need to create the home dir
folders, then add the path to the profile. I have read about the RMTShare in
KB155449. I am unable to get the batch file to use a CSV file to pull user
names from. Has anyone done this? Could you possibly provide me with an
example?

Thanks
 
We are already authenticating to the AD. Now I need to create the home dir
folders, then add the path to the profile. I have read about the RMTShare in
KB155449. I am unable to get the batch file to use a CSV file to pull user
names from. Has anyone done this? Could you possibly provide me with an
example?

Thanks
assume the the csv file contains Username (and possibly other data),
and that the username DOES NOT contain spaces.
set file="<Path>\csvfilename.csv"
for /f "Tokens=1 Delims=, " %%u in (type %file% ) do call :add "%%u"
goto :EOF
:add
set user=%1
set user=%user:"=%
md c:\users\%user%
rmtshare \\HomeServer\%user%$=c:\users\%user%


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top