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!
LVL 1
ITBankerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jay_Jay70Commented:
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
0
Jay_Jay70Commented:
you also have the option of using psexec to execut the script remotely on all your machines, if you use the above file, you can create the task easily accross the board

http://www.sysinternals.com/Utilities/PsExec.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ITBankerAuthor Commented:
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!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.