Link to home
Start Free TrialLog in
Avatar of ITBanker
ITBanker

asked on

Schedule Defrag through Group Policy for all domain workstations

I would like to use Group Policy to schedule defrags on all of my workstations.  I have read various other answers to this issue, but I am not very familiar with writing scripts.  Can someone give me a step-by-step process to make this happen?

Thank you!
Avatar of Jay_Jay70
Jay_Jay70
Flag of Australia image

you cant add a secheduled task via Group Policy - you can control security over scheduled task but you can actually create them

here is a link for the code that will run defrag on all drives for you though
http://www.dougknox.com/utility/scripts_desc/defrag_all.htm

here is a link on how to create a scheduled task via script
http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept04/hey0922.mspx

you may want to add a logon script that will create a scheduled task.  this is just trial and error really, GPO doesnt have the functionality yet
ASKER CERTIFIED SOLUTION
Avatar of Jay_Jay70
Jay_Jay70
Flag of Australia 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 ITBanker
ITBanker

ASKER

I have not responded because I have not had the time to try out Jay_Jay70's recommendations.  However, I do appreciate the attempt to answer my question and will accept the answers given.  Thank you!