Solved

PC Remapping

Posted on 2004-09-01
15
383 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
  • 4
  • 4
  • 4
  • +2
15 Comments
 
LVL 3

Expert Comment

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

Expert Comment

by:bobbydall2000
Comment Utility
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
Comment Utility
OK....now the stupid question - How would I do that?
0
 
LVL 2

Expert Comment

by:bobbydall2000
Comment Utility
If you want an example, let me know.

Cheers
Mark
0
 

Author Comment

by:mentisgroup
Comment Utility
I would please.  Thanks for your assistance!!
0
 
LVL 4

Expert Comment

by:zmorvik
Comment Utility
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
Comment Utility
0
NetScaler Deployment Guides and Resources

Citrix NetScaler is certified to support many of the most commonly deployed enterprise applications. Deployment guides provide in-depth recommendations on configuring NetScaler to meet specific application requirements.

 
LVL 2

Expert Comment

by:bobbydall2000
Comment Utility
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 95

Expert Comment

by:Lee W, MVP
Comment Utility
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
Comment Utility
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
Comment Utility
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 95

Expert Comment

by:Lee W, MVP
Comment Utility
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 95

Expert Comment

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

Author Comment

by:mentisgroup
Comment Utility
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 95

Accepted Solution

by:
Lee W, MVP earned 500 total points
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

What is IRC? IRC (Internet Relay Chat) is a form of communication between multiple users. It is available freely to anyone with inernet access. IRC is a great way to communicate with others e.g. There is an IRC channel for Ubuntu Linux, which is fo…
Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

772 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