+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
How do you do....it? Thread, Defrag PCs in Technical; I'd like to run a remote defrag across some of our PCs - previously, I did this with BeyondExec but ...
  1. #1
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,497
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    76

    Defrag PCs

    I'd like to run a remote defrag across some of our PCs - previously, I did this with BeyondExec but that doesn't like to play with our new W2K3 server. Can anyone suggest another way of doing this?

  2. #2

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,345
    Thank Post
    242
    Thanked 1,602 Times in 1,278 Posts
    Rep Power
    346
    To be honest if you feel a workstation needs defraging, re-imaging is definitely the better and quicker option. Typically you need to run scandisk prior to running a defrag.

  3. #3
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,497
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    76
    Quote Originally Posted by Michael View Post
    To be honest if you feel a workstation needs defraging, re-imaging is definitely the better and quicker option. Typically you need to run scandisk prior to running a defrag.
    Re-imaging leaves them pretty ugly anyway, though...

  4. #4

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,345
    Thank Post
    242
    Thanked 1,602 Times in 1,278 Posts
    Rep Power
    346
    How so? It should be like a brand new machine.

  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
    We set ours to defrag on a scheduled task.

  6. #6
    theeldergeek
    Guest
    Quote Originally Posted by Michael View Post
    How so? It should be like a brand new machine.
    If you image a badly fragmented machine, does it then replicate itself over to the clone, that is, the data that is put on the new hard drive is where it was on the old one, fragmented?

    I tend to defrag a machine I want to image prior to taking the image for that very reason, but I actually don't know if it is necessary to do so. I've just played safe.


  7. #7

    bossman's Avatar
    Join Date
    Nov 2005
    Location
    England
    Posts
    4,035
    Thank Post
    1,262
    Thanked 1,107 Times in 785 Posts
    Rep Power
    338
    @enjay:

    I think there are some good third party defraggers around that involve a client installation can't for the life of me remember (temporary memory loss) but have a google for them.

    As Michael has stated why would you want to run a workstation defrag network wide?
    It is far quicker to re-image unless your workstations have SSHDs.

    I have never ever ran a network wide workstation defrag before simply for that reason.

  8. #8
    busby's Avatar
    Join Date
    Dec 2009
    Location
    manchester
    Posts
    149
    Thank Post
    38
    Thanked 15 Times in 13 Posts
    Rep Power
    13
    I use psexec.exe to defrag all our machines run from a .bat file called psexece.bat in the same folder as psexec.exe.

    the .bat file contails this info

    @echo off
    :start
    cls
    echo.
    echo.
    echo 浜様様様様様様様様様様様様融
    echo
    echo Multi Defrag
    echo
    echo 麺様様様様様様様様様様様様郵
    echo
    echo 1. defrag Suite
    echo 2. defrag Classrooms
    echo 3. defrag Others
    echo 4. exit
    echo
    echo
    echo 藩様様様様様様様様様様様様夕
    set /p userinp=choose a number(1-4):
    set userinp=%userinp:~0,1%
    if "%userinp%"=="1" goto 1
    if "%userinp%"=="2" goto 2
    if "%userinp%"=="3" goto 3
    if "%userinp%"=="4" goto end
    echo invalid choice
    goto start
    :1
    psexec -d @defrag.txt defrag c:
    goto end
    :2
    psexec -d @defrag.txt defrag c:
    goto end
    :3
    psexec -d @defrag.txt defrag c:
    goto end
    etc.
    :end
    pause
    exit
    with in the same folder we have .txt files named what ever you wish with this info in
    suite01
    suite02
    suite03
    suite04
    suite05
    suite06
    suite07
    suite08
    suite09
    suite10
    suite11
    suite12
    suite13
    suite14
    suite15
    suite16
    and as you see in the .bat file it points to the .txt file and away you go remote defrag

  9. #9
    busby's Avatar
    Join Date
    Dec 2009
    Location
    manchester
    Posts
    149
    Thank Post
    38
    Thanked 15 Times in 13 Posts
    Rep Power
    13
    thought id attach it for you
    Attached Files Attached Files

  10. Thanks to busby from:

    enjay (5th March 2010)

  11. #10

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,772
    Thank Post
    1,308
    Thanked 804 Times in 698 Posts
    Rep Power
    247
    Quote Originally Posted by bossman View Post
    I think there are some good third party defraggers around
    You could try Defraggler:

    Defraggler - File and Disk Defragmentation - Free Download

    --
    David Hicks

  12. #11

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,345
    Thank Post
    242
    Thanked 1,602 Times in 1,278 Posts
    Rep Power
    346
    If you image a badly fragmented machine, does it then replicate itself over to the clone, that is, the data that is put on the new hard drive is where it was on the old one, fragmented?
    If a machine was badly fragmented usually when imaging the partition table is deleted, re-created and the data is copied or imaged. Now generally speaking you'd create images from newly installed machines not machines which are years old.

  13. #12

    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
    I use VBS and WMI for this and it even keeps track of them reporting back when they are done and any errors. Just feed it a list of computer names in computers.txt and it will do the rest. The cool version only works with Vista or above though as XP lacks the WMI calls to do it but I have one for XP too. It can run nicely in the background without logging on or disturbing the user and will even report back any errors it encounters or the time taken if using the XP version.

    It is made of two VBS scripts, one which actually does the defrag and takes the computername as a parameter the other just reads through the list of computers and spawns a whole bunch of processes simultaniously so that all the machines defrag at once. If you have XP just rename defragxp.vbs to defrag.vbs and it will use that one instead.

    In a primary school situation especially with a script like the one attached it does not take that long to defrag and is much quicker than imageing the whole lot as we don't have SCCM for automation. Updates and other things that happen also trash the order of the HD and are not worth a reimage so I find this to be a good solution. Just so that you are aware monitering the defrag takes up about 4mb of ram per computer so don't feed it a huge list if you are short on ram.

    These scripts could easily be modified to record the information back to a text file or something for performance monitering if you wanted to.
    Attached Files Attached Files

  14. #13
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,497
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    76
    @busby - possibly being stupid, but I'm not getting how I specify which PCs to defrag. I can create the text files, but I'm not sure how to tell it which text file to use...

  15. #14
    busby's Avatar
    Join Date
    Dec 2009
    Location
    manchester
    Posts
    149
    Thank Post
    38
    Thanked 15 Times in 13 Posts
    Rep Power
    13
    Sorry for the late post.

    :1
    psexec -d @defrag.txt defrag c:
    goto end
    :2
    psexec -d @defrag.txt defrag c:
    goto end
    :3
    psexec -d @defrag.txt defrag c:
    goto end


    on this part of that .bat file change the defrag.txt to the name of your text file.

  16. Thanks to busby from:

    enjay (10th March 2010)

  17. #15
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,497
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    76
    Thanks Busby, much appreciated.



SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. HDD Defrag: Puran Defrag
    By DaveP in forum Downloads
    Replies: 0
    Last Post: 29th January 2010, 03:45 PM
  2. Auto Defrag
    By shane_saintsfc in forum Windows Server 2000/2003
    Replies: 13
    Last Post: 17th March 2009, 09:49 AM
  3. Defrag Problem
    By notalot in forum Windows
    Replies: 7
    Last Post: 12th January 2009, 09:24 AM
  4. Defrag or scandisk
    By techyphil in forum Windows
    Replies: 13
    Last Post: 27th May 2007, 01:29 AM
  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)

Posting Permissions

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