Scheduled Drive C: Auto defrag for Windows Vista and 7 companywide

Hi All,

Is it possible to make all of the Windows 7 and Vista workstations to auto defrag on scheduled time for the whole company ?

I've deployed powershell into all of my Windows Vista client and some of the Windows XP is it possible for Win XP Pro too ?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Qualifying whole company indicates something configured via login script.  Scheduled qualifies a scheduled task.  It's possible to create scheduled task via a VB script.  See the links below.  The scheduled task would simply call the defrag command with the respective switches to run on a set time.

I'm not familiar enough with powershell to give you direction on that.
Will SzymkowskiSenior Solution ArchitectCommented:
jjozAuthor Commented:
thanks for the reply guys, somehow i found out that using batch login script is not preferable since for my Vista and above workstations it didn't work well :-|
Check Out How Miercom Evaluates Wi-Fi Security!

It's not just about Wi-Fi connectivity anymore. A wireless security breach can cost your business large amounts of time, trouble, and expense. Plus, hear first-hand from Miercom on how WatchGuard's Wi-Fi security stacks up against the competition plus a LIVE demo!

You don't need to "wrap" the defrag command in the scheduled task within a batch file.  you can put the defrag command as the executable and the scheduled task configurations let you pass command lines to the executable.

However, you could also have the scheduled task call a VB script to perform the defrag:

I would check out the WinInternals Defrag Manager 4.0.

I'm not positive where you purchase it now, but I believe I used to use it when it was 3.0 and it worked great.  It has an adminitrator console that you run on your server and remotely defragments your windows computers on schedules even while they are running and have mounted drives.  It kept all of our workstations and servers in good shape as far as performance.  I would give it a try at least.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jjozAuthor Commented:
@gilm0079: from the link that you gave to me, i cannot see any download link ? --> it seems that it becomes MDOP now and it is not free.
jjozAuthor Commented:
thanks ma n!!!
You're welcome.  Glad we could help and thanks for the points!
jjozAuthor Commented:
no worries man, glad that i can find the answer :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.