Home > Windows Server Tips > > How to schedule a disk defrag on Windows XP with SMS 2003
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


How to schedule a disk defrag on Windows XP with SMS 2003


Brian Tucker, Contributor, myITforum
09.22.2004
Rating: --- (out of 5)


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


After the initial install of Windows XP, the disk may need to be defragmented for optimum performance. After some time, there may need to be a reason to run disk defragmenter again to clean up fragmented files on the disk. There are eight steps in order to schedule a monthly defragging of the local hard drive and have it run silent.

  1. Create a batch file and name it something like Defrag.bat. On the first line add "C:WindowsSystem32defrag c:" and save the batch file. Do not use the quote marks in the command line.

  2. Create a new package in SMS as you would any other package (not from definition). Open the properties of the package and go to the data access tab and enter a name for the share. You can call it "WindowsDefrag" or whatever you like. Note: It does not matter how you type it, the share name is always in caps. You can set this option so that the share name on the distribution point is readable, since the default is the package ID number, which is more difficult to remember.

  3. Manually create a new program and call it something like "Windows XP Defrag" (no quotes). Open the properties of the new program and in the comments area, type "Silent Install." Adding the comment makes it easy when making an advertisement so you know what it does if you forget in the future.

    On the Run drop-down menu, select "hidden." On the Environment tab, make sure the radio button is selected to run with administrative rights. Configure the "Program can run:" to whether or not the user is logged on. Finally, make sure "use software installation account" is check marked. Do not check mark "allow users to interact with this program."

  4. Add your distribution points as necessary.

  5. Target specified collections wherever you like for your advertisement, but for this example, we will use the All Windows XP Systems collection. Under advertisements in the SMS console, create a new advertisement.

  6. Give the advertisement a name such as All Windows XP Systems Defrag. Under "package," click the drop-down menu and select the Defrag package you created earlier. Select the program you created in the program drop-down box. Select the collection you want the advertisement to go to.

  7. Change the advertisement start time on the schedule tab to be a Friday, Saturday or Sunday at 12:00 a.m. or whenever you like. Click the yellow asterisk in the mandatory assignments box. A window will pop up, select "schedule." Select "monthly" as a recurrence pattern and recur every month on the last day of the month. You can schedule a weekly, daily or monthly pattern depending on your needs. Make sure to give a start date and time as well. You should schedule the defragging when users are unlikely to be using the computer, since the process will take some time to complete as well as take up some CPU usage.

  8. Notice on the schedule tab where you have the option to allow users to run the program independently of assignment. If you check this box, the users will be able to open the run advertised programs in the control panel and execute a defrag whenever they want. Decide if this is right for your organization and if this is something you want your users to be able to do.

Now that you have scheduled your defragging, you have a batch file that will kick off a disk defrag once a month. Also, if you add this to the All Windows XP Systems collection, as soon as the client is discovered, it will defrag immediately.

ABOUT THE AUTHOR: Brian Tucker has been in the IT industry for 8 years and specializes in Microsoft Back Office applications. Brian has a passion for SMS and currently is involved in a SMS 2003 deployment for a large health care organization in St. Louis.


This article first appeared in myITforum, the premier online destination for IT professionals responsible for managing their corporations' Microsoft Windows systems. The centerpiece of myITforum.com is a collection of member forums where IT professionals actively exchange technical tips, share their expertise, and download utilities that help them better manage their Windows environments, specifically Microsoft Systems Management Server (SMS). It is part of the TechTarget network of Web sites. To register for the site and sign up for the myITforum daily newsletter, click here.

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.




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



RELATED CONTENT
Microsoft System Center
SCCM 2007 R3 goes green
VMM 2008 R2 hits RTM, denied at VMworld
Microsoft enhances IT process automation in Service Manager beta
Microsoft server manager adds Linux, Unix support
New Operations Manager 2007 feature allows for automated agent deployments
Data Protection Manager 2007: Relief from branch office backup headaches
Key enhancements to SCCM give admins more control over assets, licensing
The new Microsoft System Center: What happened to SMS and MOM?
System Center Configuration Manager 2007: A first look
Redeploy application to client machines using SMS

Windows Systems and Network Administration
Troubleshooting Windows application crashes or hangs
Converting VMware ESX machines to Hyper-V format
Using DFSR for SYSVOL replication in Windows Server 2008
Top 25 Windows PowerShell commands for administrators
Key DFS improvements in Windows Server 2008 R2
Free Windows security tools every admin must have
Group Policy makes strides in Windows Server 2008 R2
Quick tips for troubleshooting NTFS permissions
Common causes of Windows server security vulnerabilities
Cutting the cost of Windows identity and access management

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Microsoft System Center  (SearchWindowsServer.com)

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

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