Solved

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

Posted on 2014-02-20
4
2,023 Views
Last Modified: 2014-02-21
I was looking through this:
http://technet.microsoft.com/en-us/library/jj649816.aspx

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.
0
Comment
Question by:itnifl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 47

Expert Comment

by:dlethe
ID: 39875805
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.
0
 
LVL 40

Accepted Solution

by:
footech earned 500 total points
ID: 39875821
You must not have seen New-ScheduledTaskPrincipal
http://technet.microsoft.com/en-us/library/jj649825.aspx
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.
0
 
LVL 37

Expert Comment

by:Mahesh
ID: 39876023
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

Mahesh
0
 
LVL 2

Author Closing Comment

by:itnifl
ID: 39876121
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.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question