Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

First, the computers are of around 21 Win 7 Machines and 29 Win XP machines. The DC is a Win2k8 server and the Mail server is Win2k3

I need to force a remote defragmentation on roughly 50 computers. They have been complaining of slow performance and were recently plagued with a virus. It is impractical to physically go there and start 50 of these as it would have to be after hours. Is there a way to remotely send a command to each PC that will either create a scheduled tasks to kick it off or just force a defrag all together?

share|improve this question
2  
Ryan Riles nailed the answer, but if you have a bunch of virus-infected computers, you should consider re-imaging them. Only way to be sure you got it all. And your image should have less fragmentation too, so it's killing two birds with one stone. –  HopelessN00b Aug 15 '12 at 16:39

2 Answers 2

up vote 7 down vote accepted

There are going to be a number of different ways to accomplish this, but the first thing that comes to mind is to write a script to use PsExec to run defrag.exe on each PC.

share|improve this answer

For Windows 7 why are you bothering to force a defrag? Windows 7 by default defrags all hard drives on a periodic schedule.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.