How do I use GPO to change scheduled defrag on Windows 7?

LarryDAH
LarryDAH used Ask the Experts™
on
By default Windows 7 schedules a defrag at 1am, but our PCs are off at that time. Is there a way to change that time via GPO. I have seen that I can create a scheduled task under Computer > Preferences > Control Panel > Schedules Tasks but I assume that would just create another scheduled defrag. Looking at that option I would create a batch file, something like defrag %systemroot% /f

Is there somewhere in the GPO where I can schedule this directly, or can I just schedule the batch command task itself?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Systems Admin
Top Expert 2010
Commented:
The group Policy preferences method is the only way you can modify the scheduled tasks. The window that you use when creating a new scheduled task in that section of the GPO will allow you to either update or erase the existing task as long as you make sure that the task you create has the exact same name as the existing task. You just need to selection the "Update" action from the list of available actions.
You can use group policy preferences to do this using a Windows 2008 domain controller.

http://technet.microsoft.com/en-us/library/cc725745.aspx

Author

Commented:
if I look on my Win 7 PC under scheduled tasks I see the 1am defrag, the Task Name is listed as 'ScheduledDefrag'. If I use that exact same name would that tweak the existing scheduled task and let me change the time to whatever I need to?
Adam BrownSenior Systems Admin
Top Expert 2010

Commented:
It should. Haven't tested yet, so I'm not 100% on it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial