Avatar of huskeraider
Flag for United States of America asked on

Scheduled task from windows server 2003 to windows server 2008 Permission Denied

I am running a scheduled task on windows server 2003 that goes out to several other servers, some of which are server 2008. the scheduled task runs fine against other 2003 servers but receives a "Permission Denied" against the server 2008 machines. I am thinking it's a UAC issue but i have too many servers to go making changes on those 2008 machines. is there a way in my batch file to get around the permission denied issue? i'm running the scheduled task as administrator.

Microsoft Legacy OS

Avatar of undefined
Last Comment

8/22/2022 - Mon

On the task property you can set "Run with highest privileges" and it will not prompt for UAC and also check the account the task is running as has the proper permissions.

that might work if the scheduled task were running from a server 2008 machine. there is that option. on a server 2003 machine there is no such option. I could rewrite the script and run it on a 2008 machine and use that option. i would prefer to get it to work where it now exists.

Did you check the account the scheduled task uses has permission to access 2008 server remotely? what exactly the scheduled task do?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck

1. I'm running the scheduled task as administrator.
2. the task removes old log files on all remote servers.
3. When i go to any of the servers this task runs on, and perform the same task locally (delete a log file) i get:

"Destination Folder Access Denied, you need to confirm this operation".
There's a "continue", "skip", "cancel".
of course i would do a "continue" and the file would be deleted. I am pretty sure this is happening with the scheduled task. when it gets to this particular prompt it goes on by to the next server, giving me a "permission denied" in the log after the script completes.

so, i guess i need to figure out how to answer "continue" through the scheduled task.

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

I have 100+ folders on remote servers to access. it's not practical to go into each one and take ownership. the link you gave me does describe how to do this on the server itself. thank you for that.
I need to figure out how to pass that via my scheduled task, for each server i'm touching.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

A domain account with Administrative privileges.

I can access the folders on the 2008 servers. it's just the files in the folders that i can't delete.

Thanks much i'll take a look at the takeown command and post feedback.

I'll call this good. Thanks for the assist.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy