Link to home
Start Free TrialLog in
Avatar of LarryDAH
LarryDAHFlag for United States of America

asked on

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

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?
ASKER CERTIFIED SOLUTION
Avatar of Adam Brown
Adam Brown
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EshuunDara
EshuunDara

You can use group policy preferences to do this using a Windows 2008 domain controller.

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

Avatar of LarryDAH

ASKER

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?
It should. Haven't tested yet, so I'm not 100% on it.