Windows Server 2008 Access Denied in Task Scheduler

Posted on 2012-09-04
Last Modified: 2012-09-05
I have a simple batch file that backs up sharepoint to a network share using stsadm. It is on Server 2008 R2 and scheduled via Task Scheduler. It was working fine until a couple weeks ago. Now when run in task scheduler I am getting Access Denied  0x80070005. However, logged in as the same user set in task scheduler, it works fine if I invoke the bat file by double clicking it. Any clues as to what the issue with task scheduler might be?
Question by:gglollc
    LVL 28

    Expert Comment

    Did the user set in task scheduler change his/her password?
    LVL 29

    Expert Comment

    by:Rich Weissler
    When you log in as that user -- can you also run the task manually from the task scheduler?

    If you create a new scheduled task, pointed to the same batch file - does that scheduled task work correctly?

    Author Comment

    The user (Domain Admin) that I setup in Task Scheduler is the same one that I logged into the server with, so no, the password did not change. I have also tried a different user with the same result. If I manually start the task from scheduler, same result, access denied. I created a new task, same result, access denied.
    LVL 29

    Accepted Solution

    Do your scheduled tasks have 'Run with highest privileges' selected, or is that left in it's default condition?  (If it isn't checked, for testing purposes -- does the problem go away if you check it?)

    In the Action, which points to the batch file, there is an optional 'Start in' setting.  Have you tried setting that so it forces it to start the batch file from a directory you know you have read/write access to, without the possibility of triggering a UAC check?

    Author Closing Comment

    Run with Highest privileges fixed it. Interesting though it was running without that previously.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    ##the calculator has been updated to version 1.6 please download the use the updated version## Hi there, After the previous post of the original version of the calculator here :…
    Know what services you can and cannot, should and should not combine on your server.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    728 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

    17 Experts available now in Live!

    Get 1:1 Help Now