Solved

Start scripts

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
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…
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…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now