enjay Posted March 4, 2010 Posted March 4, 2010 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?
Michael Posted March 4, 2010 Posted March 4, 2010 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.
enjay Posted March 4, 2010 Author Posted March 4, 2010 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...
Guest theeldergeek Posted March 4, 2010 Posted March 4, 2010 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.
bossman Posted March 4, 2010 Posted March 4, 2010 @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.
busby Posted March 4, 2010 Posted March 4, 2010 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
dhicks Posted March 4, 2010 Posted March 4, 2010 I think there are some good third party defraggers around You could try Defraggler: Defraggler - File and Disk Defragmentation - Free Download -- David Hicks
Michael Posted March 4, 2010 Posted March 4, 2010 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.
SYNACK Posted March 4, 2010 Posted March 4, 2010 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.StartDefrag.vbsdefrag.vbscomputers.txtdefragxp.vbs
enjay Posted March 5, 2010 Author Posted March 5, 2010 @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...
busby Posted March 10, 2010 Posted March 10, 2010 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. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now