script to defragment the HD

Discussion in 'Scripting' started by Jaime, Apr 9, 2009.

  1. Jaime

    Jaime Guest

    Hi!!
    Where can I find a script to defragment the HD system of variousl computers
    on the network and then perform a CHKDSK?.

    Thanks
     
    Jaime, Apr 9, 2009
    #1
    1. Advertisements

  2. Jaime

    Al Dunbar Guest

    I don't know. You could try writing one - which scripting language are you
    wanting to use?

    /Al
     
    Al Dunbar, Apr 10, 2009
    #2
    1. Advertisements

  3. Jaime

    Umesh Thakur Guest

    you can use Win32_Volume WMI class' methods to perform both defrag and chkdsk
    tasks.

    Here is a link to Technet ScriptCenter article that talks about
    defragmentation and how to perform it using scripts:
    http://www.microsoft.com/technet/scriptcenter/topics/win2003/defrag.mspx


    I didn't find example for chkdsk but I guess, after reading the above
    article about defrag, you would be able to use chkdsk method as well!

    cheers.. umesh
     
    Umesh Thakur, Apr 15, 2009
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.