How to Run Disk Defragmenter on a Remote Computer

With the help of PsExec and console defragmentation tool (defrag.exe), you can defrag a remote computer from any location on the network.

PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. PsExec’s most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems.

Running Disk Defragmenter remotely

1. Download PSExec and save it to the Desktop.

2. Unzip the archive and move PSExec.exe to your Windows directory.

3. Open a Command Prompt window (cmd.exe) and type:

PsExec -i -s \\<RemotePC> c:\windows\system32\defrag.exe c: -f

The above assumes that the name of the remote computer is RemotePC.

Since the -i switch is specified, the program interacts with the desktop of the specified session on the remote system. Therefore, the remote user will be able to cancel the defragmentation process at any time.


Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

One Comment

  1. Jon
    said this on Thursday, March 31st 2011 1:08 pm

    I’m getting Error code 2 and defrag not runnning

Leave a Reply