?
Solved

VBS Script to defragment windows 2003 and 2008 server

Posted on 2011-02-22
3
Medium Priority
?
486 Views
Last Modified: 2012-05-11
I need a VBS script to defragment the hard drive/partitions on Window 2003 and 2008 including R2 server.

I need to be able to specify the drives/partition e.g. C: D: etc...

Can someone help me out?
0
Comment
Question by:Gerhardpet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Author Comment

by:Gerhardpet
ID: 34958004
I should have explained a bit more...

I want to set the script up on a schedule to run the windows build in defragmentation.
0
 
LVL 16

Expert Comment

by:sjklein42
ID: 34958036
You can schedule the following DOS commands.  You do not necessarily need to use VBS script. You can use the built-in Windows Task Scheduler, too.

defrag c:
defrag d:

Open in new window

http://support.microsoft.com/kb/283080/EN-US
0
 
LVL 8

Accepted Solution

by:
jimsweb earned 2000 total points
ID: 34958037
I found an interesting article for the same, but it doesn't use VBS, instead it relies on BAT file. Please have a look at it, may be of some help to you.
http://www.windowsitpro.com/article/windows-shell-bat-and-cmd/automate-the-windows-2003-defragmenter-without-paying-extra.aspx
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question