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.

Possible Duplicate:
UAC-account-users can’t see their mounted network-drives

I have a script that is applied to my office staff user accounts via GP that maps a drive for them. If the staff member is a member of their computer's local admin group, the script doesn't run. If I remove them from that group, it runs again. Not really a problem under normal circumstances because they are not a local admin, but I would like to know what’s going on. The script is shown below.

if exist o: NET USE o: /delete /yes
net use o: \\portland\officedata /persistent:no /yes
share|improve this question

marked as duplicate by Greg Askew, Scott Pack, mdpc, Khaled, John Gardeniers Jan 8 '13 at 9:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Odd based on the limited info. What does a full gpresult or a GPO results wizard show for that user on that workstation? Does it show it should be applying that policy or no? Do verbose logging to see why as well. –  TheCleaner Jan 7 '13 at 19:37
    
The GPO results wizard shows that the policy is applied. Adding the AD user account to the local admins group is all that is required to break the script. Removing the account from the admins group fixes it again. –  Corey Jan 7 '13 at 19:45
    
Where would the logging be for scripts applied via GP? –  Corey Jan 7 '13 at 19:45

1 Answer 1

Your code looks invalid since as far as I know the delete has a sister yes or no, and no need to repeat yes on the 2nd line. Here's the code what I believe should work.

if exist o: NET USE o: /delete:yes
net use o: \\portland\officedata /persistent:no
share|improve this answer

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