Solved

DFS Mapping through Script Hit or Miss Kixtart

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

23 Experts available now in Live!

Get 1:1 Help Now