Link to home
Start Free TrialLog in
Avatar of huskeraider
huskeraiderFlag 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.

Avatar of achaldave
Flag of United States of America image

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.
Avatar of huskeraider


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?
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.
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.
Avatar of achaldave
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.