Deploying user-context scheduled tasks via Intune

EmilioPB-9217 20 Reputation points


We want to create a scheduled task in the context of the user who has logged in with the following characteristics:


Every day at login

Monday to Thursday at 19:00

Fridays at 15:00


It will execute an exe file located in a folder on the computer (c:\systems\program.exe)

This program displays a message on the screen, which is only visible if it is executed in the same context of the logged-in user.

If we create the task manually, it works without problems. However, when we try to export it to XML and import it to another user's computer, we receive credential errors.

Finally, we have attempted deployment with Intune, creating the task from scratch with a script uploaded as install.intunewin at the user level, but we always receive an error.

Any help would be greatly appreciated.

Thank you in advance and best regards.

Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,574 questions
0 comments No comments
{count} votes

Accepted answer
  1. Crystal-MSFT 44,931 Reputation points Microsoft Vendor

    @EmilioPB-9217, Thanks for posting in Q&A. To deploy user context scheduled task via Intune. Here is a link list the detailed steps for your reference:,the%20Win32%20App%20Package%20to%20Intune%207%20Conclusion

    Note: Non-microsoft link, just for the reference.

    As the task needs to be run in the user context for all users, pleasr ensure your task is set up to run as BUILTIN\Users in the task you created. Also, in the PowerShell script, remove the “-User system”.

    Hope the above information can help.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful