TechNet Magazine > Home > Tips > Windows Server 2008 >  Run Check Disk from the Command Line to Find an...
Tip: Run Check Disk from the Command Line to Find and Fix Errors

You can run Check Disk from the command line or within other utilities. At a command prompt, you can test the integrity of the E drive by typing the following command:
chkdsk E:


To find and repair errors that are found in the E drive, use the following command:
chkdsk /f E: 


Note that Check Disk can’t repair volumes that are in use. If the volume is in use, Check Disk displays a prompt that asks if you want to schedule the volume to be checked the next time you restart the system. Click Yes to schedule this.

Tips RSS Feed
The complete syntax for Check Disk is this:
chkdsk [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] 


The options and switches for Check Disk are used as follows:
Volume Sets the volume to work with.
filename FAT/FAT32 only: Specifies files to check for fragmentation.
/F Fixes errors on the disk.
/V On FAT/FAT32, this displays the full path and name of every file on the disk. On NTFS, this displays cleanup messages, if any.
/R Locates bad sectors and recovers readable information (implies /F).
/L:size NTFS only. Changes the log file size.
/X Forces the volume to dismount first if necessary (implies /F).
/I NTFS only. Performs a minimum check of index entries.
/C NTFS only. Skips checking of cycles within the folder structure.


From the Microsoft Press book Microsoft Windows Server 2008 Administrator’s Pocket Consultant by William R. Stanek.

Looking for More Tips?

For more Windows Server tips, visit the TechNet Magazine Windows Server 2008 Tips page.
For more Tips on other products, visit the TechNet Magazine Tips index.
Page view tracker