Home > Windows Server Tips > Windows Server Monitoring and Management > How to automate Windows Server 2003 defrag
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WINDOWS SERVER MONITORING AND MANAGEMENT

How to automate Windows Server 2003 defrag


Serdar Yegulalp, Contributor
09.17.2007
Rating: -4.75- (out of 5)


Expert advice on Windows-based systems and hardware
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Microsoft Windows Server 2003's DEFRAG command-line tool can be configured to run automatically without the need for manual administrative maintenance.

Setting up Windows Server 2003 DEFRAG to run automatically is relatively simple:

1. Go to Control Panel -> Scheduled Tasks -> Add Scheduled Task to open the Scheduled Task Wizard and then click Next.

2. Hit the Browse button, search for the %SystemRoot%\system32\defrag.exe file and run it.

3. Choose a name and schedule and then click Next. A heavily trafficked Windows 2003 server will probably benefit from daily defragmentation; a less-trafficked server can be defragmented weekly.

4. Choose a start time -- ideally when the server load will be slow.

5. Enter the username and password for a local administrator account. DEFRAG must run under the auspices of an administrator account that has the right to manage local disks. But this does not necessarily have to be a full administrator account. You can set up a specially created local account that only has disk-management privileges if you want.

6. Click Next and select "Open Advanced Properties…" and click Next again.

7. Under the Tasks tab, there are a few options that


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Windows Server Monitoring and Management
Simple tools and techniques for finding Windows memory leaks
Top Windows server hardening standards and guidelines
Hyper-V gains new resiliency features with Windows Server 2008 R2
Troubleshooting Windows print spooler crashes
Windows server hardening: How much is enough?
Terminal Services grows up with Windows Server 2008 R2
Top five Server Core management tips for Windows 2008
Windows Server 2008 R2: Not your father's R2 upgrade
The bottom line on Microsoft Hyper-V
Does Microsoft Hyper-V fit in the dynamic data center?

Microsoft Windows Server 2003 Administration
How to install Windows Server 2003 patches when offline
Validating Windows server clusters with ClusPrep
Exploring the Windows Server 2003 Resource Kit: Clusfileport.dll
Exploring the Windows Server 2003 Resource Kit: Cmdhere.inf and CMGetCer.inf
Windows server security management: Security expert roundup
Windows server management with Remote Desktop
Avoid DC restoration problems with authoritative restore
Exploring the Windows Server 2003 Resource Kit: Confdisk.exe
Exploring the Windows Server 2003 Resource Kit: Compress.exe and Expand.exe
Exploring the Windows Server 2003 Resource Kit: Clusterrecovery.exe
Microsoft Windows Server 2003 Administration Research

Windows Server Monitoring and Administration
Top five Server Core management tips for Windows 2008
Top free tools for Windows server administration
Windows Server 2008 Learning Guide
A quick guide to Server Manager for Windows Server 2008
Moving dynamic disks to a new Windows server
A first look at Storage Explorer for Windows Server 2008
Tips for Windows domain controller optimization
Take control of server clusters with Microsoft's ClusDiag tool
Analyze server history with new tool in Windows 2008
Determining the cause of Windows server hang

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


can be set. If you want to modify the DEFRAG command-line parameters, you can do so here. Generally, DEFRAG needs no parameters to run properly. The only exception is the –f switch, which forces DEFRAG to run when there is little free space. But DEFRAG shouldn't need to be run with the –f switch as a scheduled job.

8. Click OK to approve the job.

Windows Server 2003 is now configured to automatically run the DEFRAG command-line tool based on the schedule you specified.

A free third-party tool I've used as a capable substitute for Windows Server 2003 DEFRAG is JKDefrag. It is available in a command-line/scriptable edition and uses the same defrag APIs as the Windows Server 2003 DEFRAG tool, but with many more options. If you use JKDefrag, read the documentation thoroughly -- not all the command-line switches are suitable (or even needed) for a Windows Server environment.

About the author: Serdar Yegulalp is editor of Windows Insight (formerly the Windows Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more than 12 years of experience working with Windows, and contributes regularly to SearchWinComputing.com and other TechTarget sites.

Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts