Execute-ProcessAsUser – Failed to create the scheduled task

//Execute-ProcessAsUser – Failed to create the scheduled task
Execute-ProcessAsUser – Failed to create the scheduled task 2017-09-28T00:07:51+00:00

The Toolkit Forums General Execute-ProcessAsUser – Failed to create the scheduled task

  • Author
    Posts
  • Holly
    Participant
    Post count: 5
    #2321 |

    I’m building my first complex script and have encountered this problem with Execute-ProcessAsUser: Failed to create the scheduled task by importing the scheduled task XML file

    I found one thread on the forum, but it was specific to running under SCCM. I’m just trying to run it directly while I build and test the script. I have to run it as the logged in user because the executable is on a mapped drive. The error happens whether I run the ps1 file directly in PowerShell or by using deploy-application.exe.

    Any suggestions?

  • Holly
    Participant
    Post count: 5

    SOLVED – I added -RunLevel LeastPrivilege to the Execute-ProcessAsUser and it started working perfectly.

You must be logged in to reply to this topic.