Solved

DFS Mapping through Script Hit or Miss Kixtart

Posted on 2009-04-08
2
1,034 Views
Last Modified: 2012-05-06
Good Evening Everyone,

We recently enabled DFS Sharing creating two roots on a Windows 2003 R2 SP2 Server in a domian.  Each root contains links to various other mappings on the same server.  We chose to use DFS for organizational purposes.  The data is too large to replicate therefore we don't.

Through the use of a login script ... kixtart to be exact, the users OU in AD is discovered and they are mapped accordingly to their DFS root.  We are moving away from Kixtart soon to a pure VB script applied via GPO.  I have attached snipits of code to this article.

Should we be mapping to \\domain.local\root or \\server.domain.local\root where server is the dfs server?  Sometimes the users get the mapping, other times they don't get anything.  They can log off and log back in and the status may change, it may not.  They may log out when they have the drive to see when they return it is gone.  They may log in to no mapping, log off, come back and it's there.  This leads me to believe it is not a permissions issue.

They get their home drive which is mapped through their domain profile.  I am fairly sure that the script runs regardless of the status of the "G:" drive.

Perhaps the issues will go away when we switch to the VB script.  Perhaps its a limitation of Kixtart.  Any guidance will be greatly appreciated. :)  My staff, students, and colleagues thank you in advance for your assistance.  

EDIT: The clients are all Windows XP.  Issues happen regardless of the users OU.
Kixtart Script Snipit
 
	Case InGroup( "All Staff" )
		Use G: /delete
		Use G: "\\server.domain.local\Faculty"
		Label ( 'G:\' , 'Shared Drive' )
 
	Case 1
		Use G: /delete
		Use G: "\\server.domain.local\Students"
		Label ( 'G:\' , 'Shared Drive' )
 
VB Script Snipit - this is not live yet.
strOUPath = objUser.Parent
arrContainers = Split(strOUPath, ",")
arrOU = Split(arrContainers(0), "=")
strOU = arrOU(1)
 
If strOU = "Staff" Then
  strDrive = sharedPathFaculty
Else
  strDrive = sharedPathStudents
End If
 
' Map Group drive
objNetwork.RemoveNetworkDrive sharedDriveLetter
objNetwork.MapNetworkDrive sharedDriveLetter, strDrive

Open in new window

0
Comment
Question by:klyptix
2 Comments
 
LVL 31

Accepted Solution

by:
Henrik Johansson earned 500 total points
ID: 24121510
Using servername in UNC-path takes out the usage of having DFS, so use only domain name without servername in UNC-path.

Add some debugging by using "? @error @serror" for troubleshooting.

Why is 'Case 1' trying to map same drive letter as 'Case inGroup("all staff")'? As I understand the code, it will replace the mapping.

A thaught of the reason for the problem is that the script tries to map the drive immediately after it has begun to remove the old mapping and the system hasn't finished that task. Add a sleep after /delete is worth a try
0
 

Author Comment

by:klyptix
ID: 24131703
I think you may be correct with adding a pause.  I will test and respond soon.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 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