bkrontz
asked on
Defrag via Group Policy in Server 2008
I'm learning Server 2008 as I go here and I've run into a bit of a bump with scheduling a Defrag. I've got scripts and things that would allow me to Defrag with alternate methods... but I'd like to understand why the following isn't working...
Start inside of a 2008 GPO: Computer or User Configuration > Preferences > Control Panel Settings > Scheduled Tasks
My thought is that this would be a really easy place to set up "%systemroot%\system32\def rag.exe c:" to run under a Domain Admin account who has also been given "run as a batch job" permissions.
After I "GPUpdate /force" a XP SP3 workstation, I see the task has been created (only when I log in as a local admin do I see the task... that normal?). At any rate, clicking Run doesn't work. After the scheduled task attempts to run at the desired time, I get a "Could Not Start" error 0x0.
If I go into %systemroot%\schedlgu.txt, I see the following error:
"Defrag C.job" () 4/15/2009 2:36:06 PM ** ERROR **
Unable to start task.
The specific error is:
0x80070005: Access is denied.
Try using the Task page Browse button to locate the application.
I decide to try out the task under the domain\administrator account without any change.
I figure that it's a permissions issue but attempt the following anyway:
I tried enclosing the text of the tasks command in quotes "%systemroot%\system32\def rag.exe c:"... nothing.
I try changing the text of the task from %systemroot% to C:\windows\... nothing.
The password is not blank for any of the accounts I was trying to run this under.
So... here I am... confused. Anyone dealt with this area in 2008 GPO's yet?
Start inside of a 2008 GPO: Computer or User Configuration > Preferences > Control Panel Settings > Scheduled Tasks
My thought is that this would be a really easy place to set up "%systemroot%\system32\def
After I "GPUpdate /force" a XP SP3 workstation, I see the task has been created (only when I log in as a local admin do I see the task... that normal?). At any rate, clicking Run doesn't work. After the scheduled task attempts to run at the desired time, I get a "Could Not Start" error 0x0.
If I go into %systemroot%\schedlgu.txt,
"Defrag C.job" () 4/15/2009 2:36:06 PM ** ERROR **
Unable to start task.
The specific error is:
0x80070005: Access is denied.
Try using the Task page Browse button to locate the application.
I decide to try out the task under the domain\administrator account without any change.
I figure that it's a permissions issue but attempt the following anyway:
I tried enclosing the text of the tasks command in quotes "%systemroot%\system32\def
I try changing the text of the task from %systemroot% to C:\windows\... nothing.
The password is not blank for any of the accounts I was trying to run this under.
So... here I am... confused. Anyone dealt with this area in 2008 GPO's yet?
ASKER
Thank you for the reply. I appreciate the links to other solutions, but I'm really just trying to figure out why this specific instance isn't working as advertised. I have scripts that will defrag, but this seems like a way to get rid of scripts and control things via Group Policy... which should work, no?
No, you must run the scripts to run through GPO. I wish we could run a defrag without scripts but that still isn't available.
ASKER
While you might be right, I don't understand why this wouldn't work. It creates the task as advertised... it tries to run as advertised... but there's a permission issue somewhere that shouldn't be a show stopper, imho.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for helping out! What a bummer... had my hopes up.
ASKER
Thanks again!
https://www.experts-exchange.com/questions/21619325/Disk-defragment-Cleanup-Group-Policy.html
https://www.experts-exchange.com/questions/22590462/GPO-Defrag.html