Solved

Making Home Folders as part of a domain for individual users login names.

Posted on 2010-11-18
4
245 Views
Last Modified: 2012-05-10
Hi All, I have been recently creating user accounts for a primary School and although I have now created unique login details or all children in the School I have not setup their Home folders on the server. I have added the the profile paths but I have been warned the path has been created but the home directory must be created manually with the correct permissions. This in the past has not been too much of an issue as I have been able to do exactly what it asks manually for the relatively small amounts of new users I have created.

The down side is I  have created 250+ new user accounts and all have a unique char & num based login username. I would like to create an automated batch file that will create a folder (with the same name as the users login) in the students users area on the server with full permissions for everyone. I just don't know how to automate the creation of the folder using the domain login username without doing it manualy.

I have an excel file, CSV or TSV that can be imported for each class that has their username in a columb

Any help would be appreciated

Regards

James
0
Comment
Question by:edgeit
  • 2
4 Comments
 
LVL 7

Expert Comment

by:ieden
ID: 34164694
I would suggest My Document folder redirection. When enabled, the username directory is automatically created as the policy is deployed. Then you can use the path created \\server\share\%USERNAME% as the home directory.
0
 
LVL 9

Assisted Solution

by:conradie
conradie earned 100 total points
ID: 34165058
In Excel, you could just create a column that has the word "md" in it next to the user name column. Repeat that all the way down the column. Then, create a third column that merges these two columns by adding them together with a space between.

See here for details on the merge of cells:

http://office.microsoft.com/en-us/excel-help/combine-the-contents-of-multiple-cells-HA010248390.aspx

Then take that third column and paste it into notepad, and save it it as a script, called usernames.cmd or something.

Test it out by running this script in a folder that is empty, and verify the results. Then, when its good and tested, run it in the folder you want to make the new user folders in.  
0
 
LVL 38

Accepted Solution

by:
Adam Brown earned 400 total points
ID: 34165298
You can leverage the Quest Powershell Cmdlets for this. You'll need to install Powershell: http://support.microsoft.com/kb/968930
And the Quest Active Roles Powershell Cmdlets: http://www.quest.com/powershell/activeroles-server.aspx

Once those are installed, open the Quest Active Roles Management shell and the script to do it is pretty straightforward. Change to the directory where you want the folders created and run the attached commands.

It'll build a folder based on the users' account names, then assign each user as the owner of their folder. It will then assign full permissions to the user and the Administrators group.
get-qaduser | where {$_.accountisdisabled -eq $false} | foreach {$name = $_.samaccountname
md $name
icacls $name /setowner $name /T
icacls $name /grant :r $name:F /T
icacls $name /grant administrators:F /T
}

Open in new window

0
 
LVL 9

Expert Comment

by:conradie
ID: 34165337
Acbrown, very nice solution. I'm going to have to take a look at that as well. :)
0

Join & Write a Comment

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now