Skip to content

Instantly share code, notes, and snippets.

@sniper7kills
Last active August 29, 2015 15:46
Show Gist options
  • Save sniper7kills/4193d559889a53ac9692 to your computer and use it in GitHub Desktop.
Save sniper7kills/4193d559889a53ac9692 to your computer and use it in GitHub Desktop.
Group Policy Layout
-Example.com
--Users
---Default Domain GPO - Runs script `domain.bat` at login
---Users OU
----Default Users GPO - Runs script `users.bat` at login
----Admins
-----Default Admins GPO - Runs script `admin.bat` at login
-----Admin Account 1
-----Admin Account 2
-----Admin Account 3
-----Admin Account 4
----Clients
-----Default Users GPO - Runs script `clients.bat` at login
-----Custom Group1 GPO - Runs script `group1.bat` at login for all user within security group `group1`
-----Custom Group2 GPO - Runs script `group2.bat` at login for all user within security group `group2`
-----Custom Group3 GPO - Runs script `group3.bat` at login for all user within security group `group3`
-----Biz1
------Biz1 GPO - Runs script `biz1.bat` at login
------Biz1 User
------Biz1 User
------Biz1 User
------Biz1 User
------Biz1 User
@sniper7kills
Copy link
Author

Is this a do-able setup?
Will a Biz1 user run domain.bat, users.bat, clients.bat, and biz.bat?
Will those scripts run in that order one at a time; or all at once?

If an admin were to be in group1 would they run group1.bat as well; even though that GPO is not inherited via those OU's?

Copy link

ghost commented Aug 29, 2015

Yes a biz 1 will run all the scripts and it will run in order. From the looks of it, it is doable, just takes a bit longer because it has to link back and forth into the GPO,s. It's been a long time since I have played with scripts and it always takes me two or three tries to get it right for what I want lol. As for an Admin account it needs to be in the right OU or it will not know to link the FPO and .bat to it. For my Admins I always made a separate script just to eliminate any possibility of errors.

@sniper7kills
Copy link
Author

Sweet; That's what I was hoping; I don't want admins running scripts that they don't need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment