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,181 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:David
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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
In this Micro Tutorial viewers will learn how they can get their files copied out from their unbootable system without need to use recovery services. As an example non-bootable Windows 2012R2 installation is used which has boot problems.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

623 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