This page is applicable to version 4 of AD Bulk Users only.
Version 5 and later creates home folders without the need of Home Folder Creator.
Home Folder Creation in Bulk
Creating Home Folders
Home Folder Creator is a program that’s included with AD Bulk Users. Home Folder Creator creates the users home folder and assigns the modify permission for the user. Home Folder Creator does this using a CSV file generated by AD Bulk Users.
Why a separate program to create home folders?
The reason the creation of the users home folder needs to be completed after the user import is to give the user object time to replicate across the domain so that the permissions can be correctly assigned. It also means home folders can be created at any time without the need for AD Bulk Users.
Assigning a home folder to your user
We need to update the home folder attributes of our users within Active Directory so that these attributes point to the home folder we are going to create using Home Folder Creator. To do this simply add the column header ‘createHomeDirectory’ to your CSV file (import file to be used by AD Bulk Users) and set the value to ‘True’. We also need to add a column entitled ‘homeFolder’, with a typical value of ‘\\server\users\jsmith;h:’.
If the program finds the ‘createHomeDirectory’ column and the value is set to ‘True’ then at the end of the import, the program will create a CSV file and prompt you to save it (save it as homefolders.csv or similar). Now all the users have been imported run the Home Folder Creator program and select the file you just saved (homefolders.csv). Home Folder Creator will then create the users home folder at the path specified in the homeFolder value and assign the user permissions to their home folder.
Shares and permissions
The program needs a valid Share with the correct permissions set on that Share in order for it to assign the correct permissions to the users home folder.
The suggested method:
- The first step is to create a folder on the server where the users home folders are to be created. We’ll call it ‘Users’ in this example.
- Now right click the folder and choose ‘Properties’.
- Share this folder by clicking on the ‘Sharing’ tab, we’ll also call the Share ‘Users’.
- Set the Share permissions so that all your users have ‘Full Control’.
- Click on to the ‘Security’ tab to set the NTFS permissions, we’ll need to assign the Administrators (or similar) ‘Full Control’ so the home folders can be created.
- Using the above example when a home folder is created the path to the users home folder would be \\servername\users\jsmith.
AD Bulk Users can generate the import file (CSV format) for use with Home Folder Creator. When you are preparing your import file for use with AD Bulk Users add a column entitled ‘homeFolder’ and set the values similar to the following:
\\servername\users\jsmith;x:
or you could use
\\servername\users\%username%;x:
In the above example drive X: would be used. Please note the semi-colon between the UNC path and the drive letter.
After you have imported your Users with AD Bulk Users, the program will prompt you to save a file for use with Home Folder Creator.
The file is in CSV format and can easily be recreated if required. The file contents are the UNC path to the home folder followed by the users logon name (sAMAccountName) and would be similar to the following example:
\\servername\users\jsmith,jsmith
\\servername\users\pgates,pgates
\\servername\users\radams,radams
Using Home Folder Creator open the CSV file generated by AD Bulk Users or one that you have prepared and then click ‘Create’. The program will then create a folder for each user within the Share called ‘Users’ and assign each user ‘Modify’ permissions to their home folder.
Command Line Arguments
The Home Folder Creator has the following command line arguments:
HomeFolderCreator.exe /file:myfile.csv /import /leaveOpen /log:log.txt
/file:”homeFolders.csv” Saves the log to a file
/log:”C:\log.txt” Name of the file to be imported
/import Starts the folder creation process
/leaveOpen Leaves the program open
/delete Starts the folder deletion process
/defaultPermissions:FullControl Sets the default user NTFS permission to Full Control
/defaultPermissions:Modify Sets the default user NTFS permission to Modify
/defaultPermissions:ReadOnly Sets the default user NTFS permission to Read Only
/createShares Shares the home folder. Requires a local path (E.g. e:\users\%username%).
/doNotInherit The home folder will not inherit parents permissions.