Solved

VBS Script to defragment windows 2003 and 2008 server

Posted on 2011-02-22
3
483 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 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
modifying VBScript to VBA 17 68
powershell mailbox move question 8 44
need assistance with a VBscript 3 33
VB script help 23 30
A safe way to clean winsxs folder from your windows server 2008 R2 editions
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

740 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