Solved

Running a batch programme as a scheduled task - how to set "Run as adminstrator"

Posted on 2016-08-25
4
54 Views
Last Modified: 2016-08-25
Running Active Directory in a 2012 Domain.  I have a script/batch programme that works if I run it "as administrator" if I run it as a scheduled task it fails as it needs to run "as administrator"
How to do I resolve this issue ? Is it a policy setting of some how set this on the file so when TASK SCHEDULAR runs it ..it runs.
0
Comment
Question by:ccfcfc
4 Comments
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 41770083
In the properties of the task in the "General" tab, check the box "Run with highest privileges".
0
 
LVL 16

Expert Comment

by:Dirk Mare
ID: 41770086
Open Test scheduler, right click the task and then click properties.

Under General Tap
Security Options
DirkMare
0
 
LVL 18

Expert Comment

by:Sushil Sonawane
ID: 41770099
0
 
LVL 6

Expert Comment

by:sAMAccountName
ID: 41770476
Suggesting they blindly turn off UAC without knowing their environment is horrible advice.

Is this job running on a domain controller or a member server?  If its a domain controller, checking "run with highest privilege" might not work.  If thats the case, you can force taskmgr to invoke the job using "NT_AUTHORITY\System", which may work for you.
0

Featured Post

Does Powershell have you tied up in knots?

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

The article will show you how you can maintain a simple logfile of all Startup and Shutdown events on Windows servers and desktops with PowerShell. The script can be easily adapted into doing more like gracefully silencing/updating your monitoring s…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
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.
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.

939 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now