Link to home
Start Free TrialLog in
Avatar of Jo Cox
Jo CoxFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Group Polcy - Applying what where

Would I be right in assuming
I can only apply the 'Computer Configuration' Settings to OU's containing computer objects.
AND
I can only apply the 'User Configuration' Settings to OU's containing users.

I am applying a GPO to an OU containing computers and trying to invoke a user logon script from the GPO Tree > User Configuration > Windows Settings > Script > Logon. This doesn't seem to work for me but I don't know whether I am looking at a fault or a feature.

Cheers
Jo
Avatar of trippleO7
trippleO7

Yes, Computer configuration will only apply to Computers in an OU, same goes for users and User Configuration.  Applying User Configuration settings for an OU with only computers won't work.

It all depends on what type of script you are running, but try using a Startup script for those machines...

Computer config > Windows Settings > Scripts (startup/shutdown)

What type of script is it?


Avatar of Jo Cox

ASKER

I guess I would like to run a script on an OU of computers that would only affect a subset of users.

But I get the impression the script applied to a Computer runs prior to a user logon which kind of scuppers my plan.

So I have kind of turned it on its head, so now I am applying the script to that group of users and testing to see if the Computer is in a certain OU, if so then apply the action.

Seems like the best way forward.
Avatar of Bradley Fox
Yes, you are correct, a computer configuration Startup script runs as Administrator at comptuer startup (before you see a logon screen).  A user Logon script runs at logon (after you type your password).

Make sure wherever you are storing the script has the proper security set so the users have at least read on the share and NTFS permissions.  Also check to make sure the users can access this location, if not it could be a DNS issue or something.

Assign the GPO to an OU with the user's in it and make sure Authenticated Users have read and apply set on the GPO.  Alternatly you can link the GPO in the root of the domain and use security groups to filter.  Remove the Authenticated Users permission from the GPO and add the security group you want ot use to apply these settings.

Go to a user's computer that should get this GPO and while logged on as the user:
Start --> Run --> rsop.msc
Check to see the policy is being applied.  You can RC User Config and select properties to see error information.  Also check the event logs to see if there was some error in group policy processing.
Just to be clear, you want the script to apply to only certian users on specific computers?

For example:
User1 logs onto Computer1 = Apply Policy
User1 logs onto Computer2 = Do not Apply Policy
User2 logs onto Computer1 = Do not Apply Policy

If you are using VBScript here is a nice quick query to find the full LDAP name of the computer (will show OU info too)

Set ADInfo = CreateObject("ADSystemInfo")
wscript.echo ADInfo.ComputerName

This is just an echo but you can set it to a variable and do what you want with it.
ASKER CERTIFIED SOLUTION
Avatar of StuFox100
StuFox100
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial