5

I need to run chkdsk on my server but I don't want it to reboot and hang because it's waiting for some input. I don't have physical access to the server, I can only get to it through remote desktop. Is it possible to do the chkdsk unattended? I only need to do it once, not on a schedule.

2 Answers 2

5

Yes. From a command prompt run: chkdsk C: /F /R

This assumes that you want to run it on the C: drive and you want it to fix errors and relocate data from bad sectors. Since Windows will not be able to lock the C: drive it will prompt you regarding whether you want to run it at the next reboot or not, select Y for yes. This will require no user input when it runs.

2
  • 4
    Two points to bear in mind when doing this (or any other disk maintenance). Be real sure your backup is good and allow extra time for the reboot. Also, if there really is a problem with the drive there's a chance the machine won't come back up. Oct 1, 2010 at 2:40
  • @John: Once again, good points tacked on to one of my answers. Nice team work and thanks much. ;)
    – joeqwerty
    Oct 1, 2010 at 10:54
0

If you want to run "chkdsk C: /F /R" unattended for example from a batch file, you need to echo Y for the answer "Would you like to schedule this volume to be checked the next time the system restarts?"

echo y | chkdsk C: /F /R

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .