Automatically Map Home Drive

Hello,

How can I Automatically map the users home drives?

Server 2008 r2 domain, windows xp and win 7 computers.

Thanks!
LVL 1
DAgentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MightySWCommented:
Hi, From Microsoft.

Assign a home folder to a domain user
Note: To specify a network path for the home folder, you must first create the network share and set permissions that permit the user access. You can do this with Shared Folders in Computer Management on the server computer.

To assign a home folder to a domain user:
Click Start, point to Programs, go to Active Directory Users and Computers.
In the console tree, click Users.
In the Details pane, right-click the user account, and then click Properties.
In the Properties dialog box, click Profile.
Under the Home folder, type the folder information. To do this, follow these steps:
To assign a home folder on a network server, click Connect, and then specify a drive letter.
In the To box, type a path. This path can be any one of the following types:
Network path, for example:
\\server\users\tester
You can substitute username for the last subfolder in the path, for example:
\\server\users\username  (You should use %username%)
Note In these examples, server is the name of the file server housing the home folders, and users is the shared folder.
Click OK.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DAgentAuthor Commented:
Can this set to be done when ever a new user is created?
0
SCCMCanuckOwnerCommented:
Yes, as MightySW has stated above the section repeated below deals with this:

You can substitute username for the last subfolder in the path, for example:

\\server\users\%username%

%username% will essentially tell AD to create a homefolder as the specified user account name. The typical thing to do would be to create a template account that is disabled with the %username% variable method above. Anytime you wish to create a new user simply copy the template account, enter the user specific information and enable the copied account.

Anytime you carry out this process a user should be created witha mapped drive of their account name and the drive should map automatically.
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

DAgentAuthor Commented:
Sorry I should have been more clear.

Can you set the create new user tab to alwasy have H:\\server\users\%username%

So when you make a new user it has the H:\\server\users\%username% filled in?
0
MightySWCommented:
No, you should just think about using a GPO login script then.  

This will allow you to map to home drives without annoying dos login scripts.

http://www.petri.co.il/setting-up-logon-script-through-gpo-windows-server-2008.htm
0
pedronriveraCommented:
You can setup a template user then right click copy and it will retain the mapping to the home directory you specified on the template but with the updated username
0
joenswCommented:
hi

this script vbs allow you to map users home drives



' MNDUserName.vbs
' VBScript to map a network drive to the UserName.
' Author Guy Thomas http://computerperformance.co.uk/
' Version 1.3 - April 24th 2005
' -----------------------------------------------------------------'
Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath, strUserName
strDriveLetter = "J:"
strRemotePath = "\\joe\home"

' Purpose of script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method. Result J: drive
Set objNetwork = WScript.CreateObject("WScript.Network")
' Here is where we extract the UserName
strUserName = objNetwork.UserName
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _
& "\" & strUserName

' Extra code just to add a message box
WScript.Echo " Launch Explorer, check: "& strDriveLetter
WScript.Quit

' End of MapNetworkDrive Example logon script.
0
pedronriveraCommented:
Can you set the create new user tab to alwasy have H:\\server\users\%username%

you can right click on an existing user and click copy.  That will retain the users home directory settings in the profile tab and automatically create the home directory folder with all the rights.

You won't need to include that mapping in the logon script because AD will do it for you automatically.
0
pedronriveraCommented:
Were you able to get it working????
0
DAgentAuthor Commented:
Thank you all!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.