Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Start scripts

Posted on 2016-08-15
3
Medium Priority
?
98 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 43

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 17

Accepted Solution

by:
Spike99 earned 2000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

876 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