Solved

DFS Mapping through Script Hit or Miss Kixtart

Posted on 2009-04-08
2
1,029 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
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 Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now