Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
2,482 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
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 41

Accepted Solution

by:
footech earned 2000 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 38

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

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

963 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