Task Scheduler - Run as whoever is logged on, even if user changes?

JohnPaddock
JohnPaddock used Ask the Experts™
on
I'm pushing a 'scheduled task' to all computers via group policy.  I want the task to run as whoever is logged on to the computer.  
I selected 'Run only when user is logged on', so I thought that meant run as whoever is logged on.
Is there anyway I can run the task as the logged on user?  I know I can specify the user account in the task, but different people will be logged on at different times.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018
Commented:
You need to configure this in the user section, not the computer section. By default, if you do it there, you'll see the user field will be pre-populated with %LogonDomain%\%LogonUser% - just leave it at those values. That GPO needs to be bound to an OU with the user objects, not the computer objects.

Author

Commented:
Bravo McKnife.  It worked.  Thankyou!
It looks like only the first user that logs in, can see the task in task scheduler.  It still works for the next user though.
I'm curious why the 2nd user can't see it, even if I give the everyone group read access to the task in c:\Windows\System32\Tasks\
It works though for all users, so all good.  thank you very much
much appreciated
Distinguished Expert 2018

Commented:
It's not about 1st/2nd, but about admin/non-admin. Giving read access has no effect, here.
You are welcome.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial