for /f %%a in (c:list.txt) do psexec -s -d \%%a defrag c: && shutdown -s -f
Save this as a .bat file. Download psexec from sysinternals
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
Create a directory on your desktop, put the extracted psexec.exe and you .bat file in this directory. Create a list of machine names you want to defrag, an AD dsquery output or manual list creation. Name this file list.txt. Double click .bat file or add it to scheduled tasks for later in evening.
Here is the VB code to defrag
http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
Now to make it run as admin or system
http://www.joeware.net/freetools/tools/cpau/index.htm
is how to do this, push out its install through GP, then use it to create a job file, and run the job file as a shutdown script
==============
You cannot set a defragmentation command using the group policy service of the Windows Operating System. You can only defrag a networked client by creating a software with the codes capable of defragging network hard drives.
Last Wiki Answer Submitted: February 1, 2012 8:40 am by Tpinky4,165 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
running defrag for all computes at the same time on the network may effect your network. better, do it in batches at different timings. Also you have to see about the users that it is not their peak working time on computer when you run it on their PC.
running defrag for all computes at the same time on the network may effect your network. better, do it in batches at different timings. Also you have to see about the users that it is not their peak working time on computer when you run it on their PC.