Sometimes I need to do things when the computer starts up or when a user logon. A good way to do that is with a GPO startup script or a GPO logon script.
Prepare GPO to copy files
Then you need to link the policy to a OU.
You have now created a GPO the will copy the scripts to a local folder. The files will be download to the folder again if the user is deleting or changing the files.
Create GPO to run the files
Next we need to create a GPO that run the scripts
To create a Computer startup script
You have now a script that will run from the C drive every time the computer starts
To create a User logon script
2. Double click on “Logon” on the right pane
You have now a script that will run from the C drive every time a user is logging on.
I normally I add a delay in the scripts. Because then I sure that the computer have a network connection. In case the scripts needs to pull some setting or other stuff from the network.