Software

Question

Locked

Using Group Policy to defrag XP PC's- Scrpits, Batch files??

By jshoemaker21 ·
I need a script or batch file I can push out using Group Policy. Any ideas. Please help Thanks

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Here is the VB code to defrag

by Dumphrey In reply to Thanks

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

Collapse -

Word of caution

by w2ktechman In reply to Using Group Policy to def ...

Before pushing this, it is a good idea to push out a backup service that will force backups.
While not common, it is likely that an HDD with issues will be unrecoverable after a defrag.
I have seen this happen more than once. I caused it once. Defrag, while usually recommended should not be performed on a drive that is showing signs of faltering. Doing it may just destroy all of the data.

Collapse -

That is a good idea

by Dumphrey In reply to Word of caution

My actual script I use has a chkdsk performed before it defrags, and only does the defrag if chkdsk exits with no problems found.
Lucky for me, 90% of our work resides and takes place on servers. We would be a top canidate for thin clients in all reality, so I defrag only about every 3 months on the workstations.

" Defrag, while usually recommended should not be performed on a drive that is showing signs of faltering. Doing it may just destroy all of the data"

I crashed an old workstation because I defraged in stead of chkdsked first. I have a feeling chkdsk would no thave helped either. A low level format got it back in service for about another year, in a non-trusted and non-important role.

Related Discussions

Related Forums