Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Server share to DFS Migration without End User intervention

Posted on 2010-01-08
6
Medium Priority
?
604 Views
Last Modified: 2013-11-14
Currently we have 2 AD sites and 1 Files server.  The file server is located a site 1.  The files server is named \\ServerA.  All the users at both sites have mapped share of \\ServerA\Share

I want to decomission/replace the ServerA with ServerB at site 1, add Server C to Site 2, and then make a Domain DFS replication & Namespace between ServerB & ServerC.  The question is...... Is there anyway I can make the Namespace shares look like \\ServerA\Share, so that end users will never notice the change?
0
Comment
Question by:Unisys1
  • 3
  • 3
6 Comments
 
LVL 33

Expert Comment

by:Todd Gerbert
ID: 26214398
Nope.  Your DFS namespace is going to be \\domain.name\DFSNamespace name.

Although, you can include \\ServerA\Share in your DFS topology, this way either path will work until you re-configure the clients.
0
 

Author Comment

by:Unisys1
ID: 26221000
Is there anyway, perhaps DNS,  to make serverA = "domain.name" so the old users drive mappings would work?
0
 
LVL 33

Expert Comment

by:Todd Gerbert
ID: 26231329
Hmm...I'm not sure, but if you care to wait until Monday I'll happily give it a try on my DFS.

Do clients access the share via a UNC path, or do they all have drive letters mapped?  If it's a drive letter mapping, then it shouldn't be too much trouble to use a login script to disconnect the old mapping & reconnect to the new path.
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

Author Comment

by:Unisys1
ID: 26243919
Thanks tgerbert, I'd love any help you can give.  I am not this Domain's Admin, I was just asked if I could set up a better solution for our 2 WAN linked sites to makeUsers' shares faster, redundant.  Currently all of the shares were set up by someone without using a login script.  I am just doing what I can to make this transition to a better system, seemless.  But.... we will do what is necessary to get this done, and if that means users have to remap drives, then so be it.  I am just trying to avoid this for the ~50+ users.
0
 
LVL 33

Accepted Solution

by:
Todd Gerbert earned 2000 total points
ID: 26284817
Well, it seems that adding a CNAME in my DNS that points to one the DFS namespace servers seems to work okay.  So, you add a cname serverA = dfsServer1.domain.com.

Even if the shares were manually connected to a drive letter, using VBScript I think it'd be easy to disconnect'em and re-connect. The script below will check for a drive mapping to the old server, if a drive is mapped to the old server then it is disconnected and the same drive letter is mapped to the new DFS namespace. If there's currently not a mapping to the old server, then a new one is added.

The "Const" lines at the top just need to be set for your environment, then you could use this as a login script.
Option Explicit

Const oldUncPath = "\\oldServer\oldFolder"
Const newUncPath = "\\domain.com\DFS Namespace"
Const newDriveLetter = "O:" 'If not currently mapped, use this drive letter

Dim WshNetwork
Dim currentDrive

Set WshNetwork = CreateObject("WScript.Network")

currentDrive = IsConnected(oldUncPath)
If currentDrive = "" Then
	WshNetwork.MapNetworkDrive newDriveLetter, newUncPath, True
Else
	WshNetwork.RemoveNetworkDrive currentDrive, True, True
	WshNetwork.MapNetworkDrive newDriveLetter, newUncPath, True
End If

Function IsConnected(UncPath)
	Dim i
	Dim drives
	Set drives = WshNetwork.EnumNetworkDrives
	
	UncPath = Trim(UCase(UncPath))
	
	IsConnected = ""
	
	For i = 1 To drives.Count - 1 Step 2
		If UCase(Trim(drives(i))) = UncPath Then		
			IsConnected = drives(i - 1)
			Exit Function
		End If
	Next
End Function

Open in new window

0
 

Author Comment

by:Unisys1
ID: 26285172
I looked at my problem more and I tried just making a CNAME of ServerA= domain.name and I got undesired results of "A duplicate name on the network exists".  Weird.  But taking your script into consideration, I think I'm going have to remap their shares, and a VBScript sounds good.  I will even share it and have the users run the script them selves..... I believe....

So basically, I will be doing lots of file movements and new DFS folders do minimize our domain shares.  I.E.

\\ServerA\Share
.....will become.....
\\domain.name\DFSShare\DFSfolder

And I will use your script to make that happen.  Thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

577 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