Solved

Start scripts

Posted on 2016-08-15
3
62 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 17

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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

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 procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

830 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