1

I have 100 users in my forest. We never used 'home' folder capabilities of Active Directory, now i would like to use.

The problem is that is less efficient to create manually 100 folders and assign permission.

Is there a way to create a automatically folder for each user and assign it to the 'home' folder of active directory ?

Thanks

stighy
  • 911
  • 8
  • 21
  • 31
  • possible duplicate of [active directory users have auto-created private user share](http://serverfault.com/questions/207854/active-directory-users-have-auto-created-private-user-share) – user2284570 Nov 05 '14 at 09:31

3 Answers3

4

First of all, the "Home Folder" attribute is a legacy thing. You should probably use either GPO Folder Redirection or a GPO Mapped Drives policy that includes the %username% variable to match the folder name.

If you use Folder Redirection, you can configure it to create the folders for each user if they don't exist. This is the easiest way.

You can certainly script all of this if you don't go the redirection route, but it highly depends on your environment. If you're using PowerShell (which you should), you're going to want the get-aduser, get-acl, set-acl, and new-item cmdlets at a minimum.

You can find out more info and see examples on all of these using the get-help <command> -full command. In order to use get-aduser to enumerate your existing users, you're going to need the AD PowerShell module. You get this from installing the AD Command-line tools in RSAT.

longneck
  • 22,793
  • 4
  • 50
  • 84
MDMarra
  • 100,183
  • 32
  • 195
  • 326
2

Like others have said...it's really deprecated.

But if you want to do it en mass inside ADUC:

Highlight all the users, right click, properties.

Go to the profile tab.

Check the box on "Home Folder"

Set the Connect to as whatever drive letter you want mapped.

in the To: box put "\\servername\sharename\%username%"

Example: \\fileserver1\Users\%username%

That will set all of them based on their username/login as a folder in the share on that server and give each of them full rights to their individual folder.

Skyhawk
  • 14,149
  • 3
  • 52
  • 95
TheCleaner
  • 32,352
  • 26
  • 126
  • 188
0

If you use Folder Redirection via GPO to redirect the users My Documents folder you only need to create the parent folder with the appropriate Share and NTFS permissions. Each users My Documents folder will be created automatically upon logon (and the processing of GPO) and will be created with the appropriate permissions for each user.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171