Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Drive mapping script

Posted on 2010-01-12
7
Medium Priority
?
369 Views
Last Modified: 2012-05-08
Hi there
My 'scripting guy' has become victim to the swine flu which has left me single handily deploying a domain.

I'd be utterly grateful if someone could help me compose a script, ideally dos command based/batch script that will query the logging on user's user name in Active Directory and will map the h: to that user's private area.

i.e. jsmith logs on script runs in Windows xp and \\servername\users\jmsith is mapped accordingly where ever the user logs on.

I'm partial to kix too but unfamiliar.

Detailed instructions would be utterly appreciated.

Kind regards
Gene Hunt
0
Comment
Question by:genehunt
7 Comments
 
LVL 100

Accepted Solution

by:
John Hurst earned 252 total points
ID: 26294808
Assuming that the user logs on to Windows with the same credentials as AD has for that user, then you have created the script almost yourself.

In a batch file:

NET USE H: \\servername\users\jsmith

Hope that helps. ... Thinkpads_User
0
 
LVL 4

Expert Comment

by:Medianoche
ID: 26294824
Dear Gene,

An easier way to avoid scripting to map a 'home' folder for your users is to set it up on the Active Directory's Object Properties.

I added an example image for your review.


It is still posible to make a script that queries the server through WMI to gather data and... but I think the easier the better.

Hope this helps~~

Yours,
Medianoche
mewmew.jpg
0
 
LVL 18

Assisted Solution

by:chuckyh
chuckyh earned 252 total points
ID: 26294825
This post should point you in the right direction.
http://forums.techarena.in/active-directory/1058765.htm#post4037498
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 2

Assisted Solution

by:JonasLedel
JonasLedel earned 248 total points
ID: 26296351
Some additional info on Medianoche's comment:
When specifying a home folder, you can user the %USERNAME% environment variable, which will create a folder with the username as its name. The correct permissions will also be set. If the folder exists you will receive a question asking you whether you want to apply the correct permissions.
0
 
LVL 3

Assisted Solution

by:Isorg
Isorg earned 248 total points
ID: 26296414
If going to use kix.

the syntax for the kix script would be something like this.

use h: "\\server\share\" + @userid


0
 

Author Comment

by:genehunt
ID: 26297995
Thank you all, the suggested methods all worked and i now users able to logon and map their drives :)

@Medianoche, this only seems to work users logging onto the server, not the clients. Are their additional steps required here?
0
 
LVL 100

Expert Comment

by:John Hurst
ID: 26298025
Thank you for the update and the points. .. Thinkpads_User
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

577 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