+ Post New Thread
Results 1 to 14 of 14
Windows Server 2000/2003 Thread, Auto Defrag in Technical; Hi Guys Does anyone know of a way we can set our client PC;s to defrag on shutdown or at ...
  1. #1

    Join Date
    Jul 2007
    Posts
    34
    Thank Post
    2
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Auto Defrag

    Hi Guys

    Does anyone know of a way we can set our client PC;s to defrag on shutdown or at specifics times/dates? We would like to be able to do this via group policy or server end as we have about 2000 clients.

    Thanks

  2. #2

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,374
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    I dont think there is, we use diskkeeper to do this.

    Z

  3. #3

    Join Date
    May 2007
    Location
    Suffolk
    Posts
    145
    Thank Post
    2
    Thanked 19 Times in 17 Posts
    Rep Power
    19
    defrag c: -f -v

    We use these settings in a batch file to keep servers in check.

    No problems in a good few years of use.

    On he servers, we schedule it to be done at the weekend.

  4. #4

    Join Date
    Jul 2007
    Posts
    34
    Thank Post
    2
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by Polski View Post
    defrag c: -f -v

    We use these settings in a batch file to keep servers in check.

    No problems in a good few years of use.

    On he servers, we schedule it to be done at the weekend.
    Could you explain a tiny bit on how this would be set up... as in creating the batch file.
    Last edited by shane_saintsfc; 12th March 2009 at 05:55 PM.

  5. #5

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,374
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    You would just copy the code into wordpad then save the file as defrag.bat

    In Windows 2003 Domain i cant think off the top of my head to get it on the clients as a scheduled task. In server 2008 you can set it in group policy.

  6. #6

    Join Date
    Dec 2005
    Location
    Midlands
    Posts
    130
    Thank Post
    2
    Thanked 12 Times in 12 Posts
    Rep Power
    21
    or add it as a shutdown script which was what the OP asked.

    shouldnt be a problem as long as the kids dont shutdown eavery lesson

  7. #7

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,374
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    Quote Originally Posted by deanc View Post
    or add it as a shutdown script which was what the OP asked.

    shouldnt be a problem as long as the kids dont shutdown eavery lesson
    The only problem would be if you need to reboot during a lesson or something, scheduled ask would be best

  8. #8

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    Ive been evaluating o&o defrag on my machine. Purports to do on the fly defragmenting, and also a scheduled startup defrag etc. Not sure if its something worth getting for every workstation right enough.

  9. #9
    AyatollahPies's Avatar
    Join Date
    Jan 2008
    Location
    Earth
    Posts
    900
    Thank Post
    48
    Thanked 105 Times in 95 Posts
    Rep Power
    43
    Big fan of JKDefrag myself. (Can be found on filehippo if you search)

    Can be set to run via batch. Seems to do a far better defrag than the windows system defrag. Has plenty of flags to play with too.

    Can also be set to run as the screensaver, though whether you would want such heavy disc activity so frequently is questionable.

  10. Thanks to AyatollahPies from:

    tosh74 (13th March 2009)

  11. #10

    Join Date
    May 2007
    Location
    Suffolk
    Posts
    145
    Thank Post
    2
    Thanked 19 Times in 17 Posts
    Rep Power
    19
    Sorry for the delay, on the road this morning.

    Create a batch file with the following in: -

    c:\windows\system32\defrag.exe c: -f -v

    shutdown -s



    The batch file can be local, but restrict access to it so little people do not play.

    Schedule the batch file to run, using an administrator's credentials, on the evening in question.

    The script will defragment the c: the -f forces it to do so even if it is short of space and -v means verbos (no user input required).

    Once defrag has completed, the PC will shut down.

    If you decide to test the script, you can cancel the defrag process by pressing <ctrl>+C to cancel the batch task.

  12. Thanks to Polski from:

    shane_saintsfc (16th March 2009)

  13. #11

    Join Date
    Jul 2007
    Posts
    34
    Thank Post
    2
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by Polski View Post
    Sorry for the delay, on the road this morning.

    Create a batch file with the following in: -

    c:\windows\system32\defrag.exe c: -f -v

    shutdown -s



    The batch file can be local, but restrict access to it so little people do not play.

    Schedule the batch file to run, using an administrator's credentials, on the evening in question.

    The script will defragment the c: the -f forces it to do so even if it is short of space and -v means verbos (no user input required).

    Once defrag has completed, the PC will shut down.

    If you decide to test the script, you can cancel the defrag process by pressing <ctrl>+C to cancel the batch task.

    Thanks Can this still run if the PC in logged off ie (On CTRL AlT DEL) Screen. Also is there a script to run that will run the defrag when a user click shutdown. We are looking at doing this monthly so when a user shutdown it will run the defrag before.

    Thanks
    Last edited by shane_saintsfc; 16th March 2009 at 12:29 PM.

  14. #12
    AyatollahPies's Avatar
    Join Date
    Jan 2008
    Location
    Earth
    Posts
    900
    Thank Post
    48
    Thanked 105 Times in 95 Posts
    Rep Power
    43
    Quote Originally Posted by shane_saintsfc View Post
    Thanks Can this still run if the PC in logged off ie (On CTRL AlT DEL) Screen. Also is there a script to run that will run the defrag when a user click shutdown. We are looking at doing this monthly so when a user shutdown it will run the defrag before.

    Thanks
    Not so sure about getting it to run when you click on shutdown, but it's easy enough to create a shortcut to the batch file and save it in your start menu. I give it the same icon as shutdown. Might be worth telling it to run a disc cleanup before it runs a defrag too. Just add 'cleanmgr' to the batch file.

  15. #13

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,271
    Thank Post
    884
    Thanked 2,749 Times in 2,322 Posts
    Blog Entries
    11
    Rep Power
    785
    If you set it as the shutdown script in AD then it will run on shutdown no matter where you shut it down from. You could use some conditionals in the file to check to see if it is the 28th of the month and only run if it is that day which would give you the once a month thing.

  16. Thanks to SYNACK from:

    AyatollahPies (17th March 2009)

  17. #14
    AyatollahPies's Avatar
    Join Date
    Jan 2008
    Location
    Earth
    Posts
    900
    Thank Post
    48
    Thanked 105 Times in 95 Posts
    Rep Power
    43
    Quote Originally Posted by SYNACK View Post
    If you set it as the shutdown script in AD then it will run on shutdown no matter where you shut it down from. You could use some conditionals in the file to check to see if it is the 28th of the month and only run if it is that day which would give you the once a month thing.
    Now that's an idea.



SHARE:
+ Post New Thread

Similar Threads

  1. Auto Defrag & Reducing User Profiles
    By shane-meh in forum Windows Server 2000/2003
    Replies: 10
    Last Post: 7th April 2009, 04:33 PM
  2. Defrag Problem
    By notalot in forum Windows
    Replies: 7
    Last Post: 12th January 2009, 09:24 AM
  3. Defrag or scandisk
    By techyphil in forum Windows
    Replies: 13
    Last Post: 27th May 2007, 01:29 AM
  4. Defrag PC's automatically
    By TechSupp in forum How do you do....it?
    Replies: 8
    Last Post: 12th April 2007, 01:05 PM
  5. Remote Defrag
    By Pear in forum Windows
    Replies: 5
    Last Post: 16th November 2005, 10:36 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •