Hi there,
I am trying to create a script to stop service when a user logs on and start service when a user logs off. In my case, this is done by running a batch script.
The user is a non-admin and I would like to keep it that way.
I am trying to achieve this using Group Policy.
I tried using using (User Configuration\Policies\Windows Settings\Scripts\Logon,Logoff) , but these do not work because the user does not have privileges to run scripts, and I have no idea how to employ "Run as" command in this context.
However, I managed to achieve this by using Scheduler in GPME (Computer Configuration\Preferences\Control Panel Settings\Scheduled Tasks) running it as another user with domain admin rights. That seems to work.(more or less)
I feel that this is really a dirty way of doing this. Could anyone suggest a proper way? It feels like this is a common task an admin would want to perform.
Thank you