How to Create Scheduled Tasks for All Users on a Computer?
Asked by
TechWizard99
I'm trying to set up scheduled tasks that run every hour, regardless of which user is logged into the computer. I need to create multiple scheduled tasks, with some of them being created in a disabled state. The way I envision it is: Task A will disable itself once certain conditions are met and then trigger Task B to run at the next startup. When Task B runs, it will disable itself and enable Task C for each user logon. My challenge is that when I install these tasks via Intune, they seem to only be created for the user who installs them. For instance, if Bob installs the task and logs out, Sarah won't see the tasks in her scheduler when she logs in. I'm looking for any alternatives or solutions to ensure these tasks are available to all users. Thanks!
Answers
Be sure to create the scheduled task to run under the /SYSTEM account. Just keep in mind this might limit its ability to interact with the Windows user interface.
Reply to this answer
Have you considered using a computer group policy task instead? It's a more traditional approach, but I think it might fit your needs better than Intune.
Reply to this answer
I handled a similar situation with NSSM, which is great for creating a service that runs a PowerShell script. Lock down the script folder so users can't tamper with it, and run the script as a service account. I've set up a main service that checks for new or updated scripts every 30 minutes, which helps with deployment.
Reply to this answer
You could install the tasks as SYSTEM and set the running account to BUILTINUsers. This should help with having them available for all users.
Reply to this answer
It sounds like the scheduled task isn't being created under the SYSTEM context, which is probably why it's not showing up for all users. Make sure to adjust that setting for it to work correctly.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions