Solved

How do I map a network drive to a computer OU?

Posted on 2008-10-06
6
302 Views
Last Modified: 2010-04-21
Hi all,
I am attempting to map a network drive to about ten computers on our network via GPO.  For reference, the users logging in already have some mapped network drives via a user GPO, but I only want this drive to be accessible on these ten computers.  I am using a drive letter that will not conflict with other existing policies.
I have created a computer OU for the ten machines in question, and linked a GPO to this OU.  The GPO has "User Configuration" disabled, with only "Computer Configuration running.  In the Startup Scripts, I have two files: pushprinterconnections.exe (so we can push out a printer using the GPO) and my .bat file, which looks like this:

@echo off
net use j: "\\server\share name"
exit

When users log on, sometimes they get the network drive, sometimes not.  When they do, it shows up as "Disconnected Network Drive (J:)".  Despite that, the drive can still be opened and files accessed, but this is pretty sloppy, and I need the drive to be accessed properly every time.  I have tried playing with the permissions on the share folder, adding a group composed of the computers in question, but this has not helped.

Interestingly enough, I can rename the "Disconnected Network Drive (J:) to the apppropriate name and it will do so.  I cannot disconnect the drive via GUI or CLI even logged in as Administrator; it says the drive is not in use.  I'm running out of options and could really use some help.  Thanks!
0
Comment
Question by:ipstech
  • 3
  • 2
6 Comments
 
LVL 58

Accepted Solution

by:
tigermatt earned 125 total points
ID: 22652426
I wouldn't use a Startup Script to map network drives; they are too problematic from my experience with them, and you end up with the behaviour you are seeing.

Perhaps a better method would be to enable User Configuration on this particular GPO, and set the batch file as a User Logon Script. You can then use Loopback Processing (in "Merge" mode) as per http://support.microsoft.com/kb/231287 to ensure that the User section of this particular GPO is actually applied to the Computer object (by default this particular configuration would not work, loopback processing means it can)

-tigermatt
0
 
LVL 4

Expert Comment

by:lscapa
ID: 22652700
can you post the following from a client that is not showing the drive?
gpresult /v > gp.txt & gp.txt
 
While tigermatt gave a good workaround that really doesnt resolve the issue.
0
 
LVL 4

Assisted Solution

by:lscapa
lscapa earned 125 total points
ID: 22652721
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Author Comment

by:ipstech
ID: 22652747
Hi Matt,

I've done loopback policies before, but had hoped to do it through computer policy.  Since I agree with your assessment that it is unreliable, I did as you suggested, and everything works great.  I'm accepting your solution.
0
 

Author Comment

by:ipstech
ID: 22652768
lscapa,

I like your solution as well, and didn't refresh before posting.  I'm going to accept multiple solutions.
0
 

Author Closing Comment

by:ipstech
ID: 31503513
Thanks to both of you.  One solution is great as a workaround, and the other provides a good explanation of the original problem that I had been unable to find before, and also gives excellent advice.  Much appreciated.
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

679 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