2

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
3
  • 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, 2013 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, 2013 at 19:45
  • Where would the logging be for scripts applied via GP?
    – Corey
    Jan 7, 2013 at 19:45

1 Answer 1

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

Not the answer you're looking for? Browse other questions tagged .