I have an application that is installed only on computers in one OU. The program requires some special config/permissions added to the user profile, so I wrote a Powershell script to setup the currently logged in user.
I assume a 'startup' script wont work because it needs to run as the currently logged on user, so I was going to use a User GPO. What is the easiest way to limit the User Logon Script GPO to run only on the machines in that OU?
I would create a Computer GPO, linked to the OU containing the machines, that copies the powershell script here:
C:\ProgramData\Start Menu\Programs\Startup
.You can use this Preference to copy the file:
Computer Configuration -> Preferences -> Windows Settings -> Files
Configure your logon script in the GPO. Then use Group Policy loopback processing in merge mode in the GPO. This will tell Group Policy to apply the users normal GPO settings as well as the user settings in this GPO only when they log into a computer in scope of this GPO.