Solved

Start scripts

Posted on 2016-08-15
3
52 Views
Last Modified: 2016-08-15
I'm trying to setup a start up script that will map a users folder by there login name but I'm drawing a blank any help would be great.
0
Comment
Question by:Ccheever
3 Comments
 
LVL 39

Expert Comment

by:Adam Brown
ID: 41756806
Mapping drives is best done with Group Policy Preferences in Windows 2008. Preferences allow drive mapping based on group membership and other identifying attributes, and the drive path can utilize environment variables like %logonuser% to denote the user's username in the path. https://technet.microsoft.com/en-us/library/cc770902(v=ws.11).aspx
0
 
LVL 16

Accepted Solution

by:
Spike99 earned 500 total points
ID: 41756859
NOTE: I think it's best not to create a share for each user.  If you have 10 users, that might be OK, but if you have thousands, that will bog down the file server. So, it's best to share the containing folder & not each individual user folder.

So, assuming you have a hidden share, HOME$, on the FileServer for the user's home folders, with one folder for each user, you could write a logon script with this line:
net use H: \\FileServer\Home$\%username%

Open in new window


The %username% variable also works when adding user-specific paths to a user's account properties in AD or when scripting bulk user creation scripts.

For example, a roaming profile share could be added to the Remote Desktop Services "profile path" by just pasting the UNC path using the %username% variable:
\\FileServer\Profiles$\%username%

Open in new window


After you add that line, the actual user name will fill in as soon as you click "Apply."
1
 

Author Closing Comment

by:Ccheever
ID: 41756919
that's what I was looking for thank you
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…

785 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