[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Map drive to different targets depending on localhost name

Posted on 2016-10-03
4
Medium Priority
?
85 Views
Last Modified: 2016-10-18
Hi Experts,

Looking for a script of sorts to map a network drive to site specific storage.

Information:
1 AD domain
3x Sites
2-3 Windows Server per site
1 admin account used to logon to all servers
3x External storage devices per site

What needs to happen in script;
When the admin account logs on to a server that is located in site two the logon script needs to map drive letter H: to that specific site storage.
Same for the rest of the sites.

Was thinking of using a text file with host names but not sure how to link the specific sites.
efspdc = site 2 = edf-syn
hostname = site = storage

Thank You in advance.

DirkMare
0
Comment
Question by:Dirk Mare
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 29

Accepted Solution

by:
Michael Pfister earned 1000 total points
ID: 41827539
I'd use a batch script i.e.

If %COMPUTERNAME% == Site1 net use H: /del /y & net use H: \\SERVER1\Share
If %COMPUTERNAME% == Site2 net use H: /del /y & net use H: \\SERVER2\Share
If %COMPUTERNAME% == Site3 net use H: /del /y & net use H: \\SERVER3\Share

Open in new window

1
 
LVL 8

Assisted Solution

by:Senior IT System Engineer
Senior IT System Engineer earned 1000 total points
ID: 41827554
How about using Group Policy Preference and then set the WMI filter ?
1
 
LVL 31

Expert Comment

by:masnrock
ID: 41830651
Either method provided should work, it's just a matter of whether you prefer Group Policy or batch files. Batch files are simpler and generally more predictable.
0
 
LVL 16

Author Comment

by:Dirk Mare
ID: 41848942
thank you both for your input.

DirkMare
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The reason that corporations and businesses use Windows servers is because it supports custom modifications to adapt to the business and what it needs. Most individual users won’t need such powerful options. Here I’ll explain how you can enable Wind…
An article on effective troubleshooting
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

649 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