Link to home
Start Free TrialLog in
Avatar of ie0
ie0Flag for United States of America

asked on

Redirect traffic that goes to my old windows server to a new windows server

I am replacing my old Windows server with a new box.
How do I redirect traffic that goes to my old windows server to a new windows server.

Some clients have mapped drives to the old server which I can remap with GPO but how do I redirect requests like \\oldserver\sharename
to \\newserver\sharename

my new server is Windows 2012 R2.
Avatar of bbao
bbao
Flag of Australia image

i assume you have an AD domain in place as you mentioned GPO was applied for drive mapping. i also assume your old and new servers have different IP addresses.

if no one intends to use the old server or the old server is to be offline at all, a simple solution is to modify DNS and/or WINS settings to point the old server directly to the new server's IP.

be aware this way the network share names have to be kept as they were.
Avatar of ie0

ASKER

What kind of change in DNS?
Thanks.
An easy way to fix this is to run this command on the OLD server "net share" (without the " "). That will give you a list of all the shares on the old server. You can then use that list to create a batch file to re-create the shares on the NEW Server like this
:BackupShare
Set ShareName=SrvBackup
Set User=Bob
MD D:\Data\%ShareName%
Net Share %ShareName%=D:\Data\%ShareNamer% /Grant:%User%,Full /Grant:"Domain Admins",Full /Remark:"D:\Data\%ShareName%"

That will create directory at D:\Data\SrvBackup and a share named SrvBackup with full control share permissions for Bob and Domain Admins. You can then use this template to re-create the rest of the directories and then share them and then assign them share permissions.
If the old server is going to be gone completely, you can use the DNS administration tool on your domain controller to find the references to the old server. Edit the reference and change it to the IP address of the new server.

However, I would suggest at the same time as the above, it is better to notify everybody that the old server is going away as of a given date. Give some instructions on how to change any shortcuts and let them fix it themselves. Otherwise you will find yourself faced with never being able to get rid of the old shortcuts because people keep using them and as time goes on having a whole bunch of old entries in your DNS and elsewhere.
Avatar of ie0

ASKER

Lionel,
Does this mean \\olserver\sharname will now  be redirect to \\newserver\sharename?
Yes, let say you have a logon script that creates a network connection to \\old-server\share-name1 then once you create the share share-name1 on the new server all you do is change the net use in the logon script and it will connect to the new server and the user will use the same drive letter. Also if you use GPO to make network connections then you simply change the server name there and it changes without the users having to do anything different.
Avatar of ie0

ASKER

Lionel,
does this mean the old server has to be online?
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Lionel MM
Lionel MM
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To add to LION suggestion you can also achieve this by using Group Policy Preferences to remove all the network map shares and push new share mappings out to the users.

This process gets you away from having to deal with scripts.  If you do not have familiarity with scripting this is a good process to implement.
Here is a KB from MS that shows you the steps.
https://technet.microsoft.com/en-us/library/cc770902(v=ws.11).aspx
https://blogs.technet.microsoft.com/askds/2009/01/07/using-group-policy-preferences-to-map-drives-based-on-group-membership/

Either way it can be accomplished, but it is a good time to start looking at GPP to handle a lot of the mundane scripting and it also allows others to easily make mods without have to learn the custom script that an Admin created.



Here is an example of my GPO for Mapping drives
User generated image
Answers were provided after the comment you are selecting as an answer showing that that comment was not sufficient. At best that comment should get an assisted answer however other answers address the more specific questions asked like ID: 41753657, ID: 41753806, and ID: 41753970.
Avatar of ie0

ASKER

Thank you.