changing DNS to redirect users to new file share

I migrated a series of shares from server A to server B.  Typically I would just change the login scripts but many users have mapping they did themselves.  There is also a ton of home folders we need to redirect.  With that said..  Can't I simply change DNS to have a CNAME that redirects to the new server?  So, server A resolve to the IP address or host name of server B?  This way every could reference the old server name but yet get directed to the new server.
Who is Participating?
Pramod UbheConnect With a Mentor Commented:
create a cname of server A pointing to host A record of server B
you also might have to add some SPNs as per this -
KimputerConnect With a Mentor Commented:
IF server A was ONLY there for filesharing, it's possible. If there's any other reference to it (for example AD, DNS, MAIL), those references will be broken too.
If you want to test just one PC using this method, then adjust that PC's local c:\windows\system32\drivers\etc\hosts file with the line

servera-name IP.of.server.b

If this PC works fine, you can adjust your DNS server.
dan_blagutConnect With a Mentor Commented:
You can also run an script that modify all shares to the new server.

Set WSHNetwork = CreateObject("WScript.Network")
Set WSHShell = CreateObject("WScript.Shell")

Set Drives = WshNetwork.EnumNetworkDrives

For i = 0 to Drives.Count - 1 Step 2
                If ((InStr(1,",,,,,, and all servers names", lcase(server))>0)and not(lcase(right(rtrim(partage),4)))="saga") Then
                'we delete the existing share
                               WSHNetwork.RemoveNetworkDrive Drives.Item(i), True, True
                               'we recreate the share
                               WSHNetwork.MapNetworkDrive Drives.Item(i), "\\newservername\"&partage,True
                End If

                'If the share contain an specific word= "Saga", we have an exception
                If ((InStr(1,",,,,,, and all servers names", lcase(server))>0)and (lcase(right(rtrim(partage),4)))="saga") Then
                               'we delete the share
                               WSHNetwork.RemoveNetworkDrive Drives.Item(i), True, True
                               'we recrate the share with another server
                               WSHNetwork.MapNetworkDrive Drives.Item(i), "\\newserver2\"&partage,True
                End If
'That's all

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.