How to run Chkdsk on all drives at startup on Windows Server 2003R2

I am struggling to find a way to automate chkdsk /f on all drives at startup, as so far I couldn’t accomplish this task.

  1. Cannot use chkdsk in a batch file, as it would require user intervention (Y/N prompts in case of locked volumes).
  2. The “fsutil dirty set ” method will not work completely, only the c: drive check will be executed at startup

Any idea?

Answer

  1. I use this utility: chkdskall
  2. You can use chkdsk in a batch file by echoing the Y and piping it to chkdsk as follows:

    echo Y | chkdsk c: /f

Attribution
Source : Link , Question Author : Riccardo , Answer Author : James

Leave a Comment