• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2722
  • Last Modified:

Create a scheduled task and set it to run wether user is logged on or not, and run with highest privileges

I was looking through this:

But I didn't find a way to set the task I was creating to run wether user is logged on or not, and run with highest privileges.
1 Solution
You have to make the task run as a system task, using Administrator privileges.  You generally configure them to run when system boots up, and then at whatever interval you prefer, but again as administrator.
You must not have seen New-ScheduledTaskPrincipal
It says, "When you use a scheduled task principal, Task Scheduler can run the task regardless of whether that account is logged on."
And with the -RunLevel parameter you can specify to run with highest privileges.
You can use GP Preferences to get this done

GP preferences are very well constructed and can be used to set task with your desired features for users OR computers during logon \ startup \ particular schedule

itniflAuthor Commented:
Thanks for all replies. I will comment each individually:
dlethe: Thank you, but I was not sure how to do this with powershell.
Mahesh: yes, you are right, generally this solution could work. However, I am looking to use powershell so that I can generate schedule tasks as a result of other program execution. It is better for me to keep it all in one place, and just feed the script with parameters that come from other execution.
footech: I guess you are right. Seems like it works.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now