Solved

PC Remapping

Posted on 2004-09-01
15
390 Views
Last Modified: 2010-04-11
At one of my client sites there was a server (Server A) that I had to remove from the domain to repair.  I loaded the volumes on another server temporarily (Server B).  When it was taken offline, the users were not able to access their shares so I ended up going to each individual PC to remap their respective shares.  
I have repaired that server (Server A) & it is in production now.  It just needs the volumes loaded back to Server A  My question:
 
Is there a better way to do this than to go to each individual workstation & remap drives?  Maybe a group policy or login.bat file?
0
Comment
Question by:mentisgroup
[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
  • 4
  • 4
  • +2
15 Comments
 
LVL 3

Expert Comment

by:fatlad
ID: 11953874
a login script could work for this, and would be quite easy.
0
 
LVL 2

Expert Comment

by:bobbydall2000
ID: 11953879
Hi.  The best solution is a login script file.  This way you can format a machine, login as a different user, etc., when a user logs into the domain, the login script is run and all drives mapped.  You can also do other things with the script like time sync, etc.

You can also have differnt login scripts for different users or groups.

Cheers
Mark
0
 

Author Comment

by:mentisgroup
ID: 11953887
OK....now the stupid question - How would I do that?
0
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
LVL 2

Expert Comment

by:bobbydall2000
ID: 11953888
If you want an example, let me know.

Cheers
Mark
0
 

Author Comment

by:mentisgroup
ID: 11953938
I would please.  Thanks for your assistance!!
0
 
LVL 4

Expert Comment

by:zmorvik
ID: 11953959
Would look into login batch files.  Can also be done from Group Policy.  

With batch files, you can delete specific mapped drives with the following:
net use <drive letter> /d /y

Then map them to server A once again.


Example:

net use s: /d /y
net use s: \\serverAname\sharename
0
 
LVL 3

Expert Comment

by:fatlad
ID: 11954089
0
 
LVL 2

Expert Comment

by:bobbydall2000
ID: 11954308
Here is a great page for logon scripts:

http://www.computerperformance.co.uk/Logon/logon_scripts.htm

And this site near the bottom had great info [and good info in general for Batch files]:

http://www.onesmartclick.com/programming/batch-files.html

A small example would be the script I use for myself to map data drives at the office:

logon.bat [file name]
net use g: \\domain-server\data
net use i: \\domain-server\reports
net use lpt2 \\domain-server\hp5

Whereever and whenever I login, Drives G and I are mapped to those shares on the server and maps the HPLJ 5 to LPT2 locally.  You can then see these mapping in windows.

Cheers
Mark
0
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 11955928
Login scripts are good - but for simple editing, assuming replacing a server is something that has to be done often enough, you might want to use a variable name for the server name - for example:

SET TheServer=SERVERB
NET USE g: \\%TheServer%\data
NET USE i: \\%TheServer%\reports
NET USE lpt2 \\%TheServer%\hp6

(I've seen and created some long login scripts and using a variable can make things easy to move by editing one line instead of 6)

Another option is to setup a distributed file system incorporating Active Directory.  If you setup both servers as part of the DFS and configure file replication, then you can map to the domain name instead of the server name (I've never setup a DFS for file sharing before - beyond install software - this might require a little more research.  Check out http://www.microsoft.com/windows2000/techinfo/howitworks/fileandprint/dfsnew.asp
0
 

Author Comment

by:mentisgroup
ID: 11956853
Cool.  Thanks guys.  In what instances would these examples NOT work?  In Group Policy, I added the logon.bat file.  I went into EDIT to look at the syntax and everything looked ok.  I have a PC that I am testing on before I go live to the domain & want to make sure I don't spend a full day going to each & every workstation to map.  On the test PC, the drives are not added on logon.  
0
 
LVL 2

Expert Comment

by:bobbydall2000
ID: 11956934
Where did you put the logon.bat file?  Also try it in the user profile itself to see if it works.

Cheers
Mark
0
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 11956986
Group Policy Login scrripts are probably where microsoft is going to focus things in the long term, but I'd suggest putting it in ye olde netlogon folder, C:\WINDOWS\SYSVOL\sysvol\viartcorp.local\scripts

You would then assign the script to the users in the user object properties in Active Directory.

I would then test things to see what happens by mapping a drive to \\server\netlogon and running the script manually from a dos prompt.  This way you see everything that happens and can more easily debug.

You can probably debug similarly with the GPO scripts, but you'll have to figure out where they are stored (typically in a buried location with MANY characters in length).
0
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 11957001
(Quick note - my domain name is the path above - replace viartcorp.local with whatever your domain name is)
0
 

Author Comment

by:mentisgroup
ID: 11982013
I am loading the volumes on Tuesday, the 7th at night & the examples will not work for some odd reason.  I've created the script which is easy enough to do but will not work when applied on a test PC.  Instead of going to each workstation I am in the middle of creating a document for the end-user to follow to remap their drives - which is the last thing I wanted to do.  Are there any utilities that can be downloaded to diagnose group policy issues?  I think I am applying the policies correctly but I am not sure.  By the way - I am on a 2000 server network with XP clients.  
0
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 500 total points
ID: 11982412
GPRESULT on the XP clients can give a clue what's happening

You can also assign a basic (non Group Policy) login script - create the script here (on the server) %windir%\SYSVOL\sysvol\NameOfYourDomain.local\scripts

Then in ADU&C, set the script for each user.  

Using IFMEMBER (May be a resource kit util, may be included with XP, not sure), you can check group membership and map drives accordingly.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

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