0

I've been searching for an hour and have not had any success so if I overlooked this as a previously answered question please let me know.

I am trying to have a logon script that maps drives on all computers in the domain. I have followed this: https://technet.microsoft.com/en-us/library/cc781361(v=ws.10).aspx for adding the script. However it still does not run for users on the domain when they log onto their computers. Do I need to push it to the machines or activate it in some way?

To get into the Group Policy Editor I did the following (This might explain why its not working to someone). I went into Group Policy Manager --> Forest --> Domains -->MyCompany.local --Default Domain Policy. I right clicked on that and hit EDIT and from there I followed the instructions in the above link. Then I went back to Group Policy Management and right clicked on Default Domain Policy and hit "Enforced". Still nothing when users log in.

Any help is appreciated. I am a developer not a sysadmin so active directory is out of my area of expertise.

I am using Windows 2012 Server Standard R2

The PC IS on the domain.

Two weird things (possibly a hint for someone more knowledgeable)

1- When I log onto the server as the user through RDP it DOES map the drives I have set in the Group Policy Editor. But the script doesn't appear to be running (which maps other drives).

2- If I open explorer and browse to the folder with my script \MyCompany.local\sysvol\MyCompany.local\Policies{RANDOMGUID}\USER\Scripts\Logon and I try to run the script I receive this warning so I am not sure if this is a permissions issue?

http://i.stack.imgur.com/qDIwe.png

I have also tried gpupdate /force on the PC

2

I have a few suggestions.

As far as best practices go, I'd advise against modifying your Default Domain Policy. It's better to create additional policies as you need them. Having Group Policy Objects for each purpose makes it easier for you to link/unlink as you need to.

Second, if you have a 2008R2 domain and can use Group Policy preferences to map drives, that's going to be a far nicer solution. GPP negate the need for login scripts and give you a lot more control with a lot less scripting.

Here's an article detailing the process: http://blogs.technet.com/b/askds/archive/2009/01/07/using-group-policy-preferences-to-map-drives-based-on-group-membership.aspx

If you have XP clients, you'll need to install the Group Policy Client Side Extensions: https://www.microsoft.com/en-ca/download/details.aspx?id=3628

| improve this answer | |
  • +1 for using GPP drive maps. Whenever I see logon scripts mapping drives at a job, it immediately jumps to the top of my hotlist to be migrated. – tfrederick74656 Dec 2 '15 at 15:25
1

The PCs aren't recognizing the server where the script lives as being an Intranet site (as is suggested by the error message). This means that a stricter security policy applies to them.

I assume that the server in question is your server, or one of your servers. Are you perhaps referring to it in a way that the workstation doesn't recognize?

You can add the server to the "intranet zone" through group policy (or machine by machine) in IE settings. You might need to add the short version of the name to the defaults:

  • yourserver1
  • yourserver2
  • *.yourcompany.local

or whatever, to User Settings -> Administrative Templates -> Windows Components -> Internet Explorer -> Internet Control Panel -> Security Page.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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