Solved

DFS Mapping through Script Hit or Miss Kixtart

Posted on 2009-04-08
2
1,040 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

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.…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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