Schedule Defrag through Group Policy for all domain workstations

Posted on 2006-03-22
Last Modified: 2009-01-29
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!
Question by:ITBanker
    LVL 48

    Expert Comment

    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

    here is a link on how to create a scheduled task via script

    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
    LVL 48

    Accepted Solution

    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
    LVL 1

    Author Comment

    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!

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
    Learn about cloud computing and its benefits for small business owners.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video discusses moving either the default database or any database to a new volume.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now