Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to map a network share in Windows Server 2008 R2 x64 for hours now. We have an AD Domain, DNS, etc. It is working. I have a batch file which contains only 1 line.

net use z: \\Storage\backup /persistent:yes

and I have a GPO. What I tried until now:

Setup batch file in the GPO as

Startupscript (Computer Configuration - Windows Settings - Scripts - Start), put the batch under

\\domainname\SysVol\domainname\Policies\{GUID}\Machine\Scripts\Startup

setup batch file as

Logonscript (User Configuration - Windows Settings - Scripts (Logon/Logoff) - Logon),

put it under

\\domainname\SysVol\domainname\Policies\{GUID}\User\Scripts\Logon

and also under \\domainname\NETLOGON

Then I discovered that Logon scripts and UAC don't play well together, so I tried Microsoft's preferred workaround described here.

So same thing as above with launchapp.swf and my batch as parameter. I also tried "EnableLinkedConnections" as described here. And I have "Always wait for the network at computer startup and logon" enabled in the GPO. The user on the Server is a local administrator and I can not change this. I'm viewing the server via Remote desktop and I always did gpupdate /force after changing the GPO... The drive won't map and I don't see an entry in the Event Viewer. I'm lost and frustrated, please put me in the right direction.

The share is read only for normal users and writable for the user who logs on to the server which I want the drive mapped to. If I execute the batch and/or the launchapp.wsf after logging in, everything works fine. Sorry for my bad english.

share|improve this question
    
The problem with UAC is described in the linked Technet Article under subsection Group Policy Scripts can fail due to User Account Control Your 2nd point is interesting, I linked on the OU containing the targeted computer. So maybe here is my mistake, unfortunately I can not work on this problem in the next 2 weeks. But thanks so far, I will also definitely take a look at Group Policy Preferences, seems promising. –  duenni Apr 14 '11 at 17:11
    
Yes, that is likely the problem. A user GPO containing a user logon script will not affect a computer object. –  jscott Apr 14 '11 at 17:16
    
possible duplicate of Windows Server 2008 mapped drives not showing on workstations? –  Chris S Apr 14 '11 at 17:22

1 Answer 1

I'm not sure if this is exactly what you are trying to do, but I recently moved from a script to map network drives to using Group Policy Preferences to do this. The level of control and automation is incredible. Here is the Microsoft "Getting Started" link. There are a ton of references on the web that go into greater detail about the types of things that you can besides just map drives.

We have different shared drives for different departments, and some people should have access to multiple drives. GPP allows us to assign the drives to specific Organizational Units, Security Groups, or pretty much any level of targeting that you can imagine. This greatly simplifies setting up new computers for users.

We also use this for Shared Printers, if that is something you do as well.

Some issues that we have run into, Windows XP machines must have a few prerequisites installed before they can process the GPP. We also had to set each mapped drive to "run as the logged on user", to ensure that the proper permissions were set so that the drives would actually mount.

This could be an alternate route around your problem, while at the same time, providing a more "visible" method to administer these shares.

share|improve this answer
    
Small question: If my Domain Controler is a Windows Server 2008 and the client which I want to map the drive also then I did not have to install further software, right? –  duenni Apr 14 '11 at 15:42
    
Are you saying the client is Server 2008 as well? If so, that should be correct. I only had to install software on our XP clients. Windows 7 and Server 2008R2 picked up the GPP automatically. (We do not have any Vista clients, so I don't know how it works.) –  minamhere Apr 14 '11 at 15:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.