How to automate disk checking in Windows?

Chkdsk is a very manual, technical solution

Hard Drive checking in Windows reports a lot of unnecessary info, requiring that you read through it the chkdsk report, etc. Also chkdsk can’t fix problems on an in-use files (like the Windows drive). It seems like a little thing, but a non-technical user can’t understand ChkDsk results and it takes even a technical user a minute to read through the report for each hard drive.

Even if I automated Chkdsk with the /x and /f options, I still have to read the report every day.

Is there a tool or built in service which will:

  1. Automatically check all drives for errors
  2. Report a simple “no problem” or “problem”
  3. Ideally, schedule a repair operation on the next restart.
  4. Bonus points: restart the computer to do the repair, and report all of that.

Answer

There is a system command you can use to mark disk for automated checking on the next reboot:

FSUTIL dirty set <drive>:

For instance:

FSUTIL dirty set c:

Processing report is available via Event Viewer – System Log.

If you want an automated checks – put it as a task into Windows Task Scheduler.

If system founds disk problems it may mark volume as dirty(bad). To query dirty status use:

FSUTIL dirty query c:

Note that running FSUTIL require admin rights.

Alternatively you can adapt this PowerShell script for your needs.

Attribution
Source : Link , Question Author : Clay Nichols , Answer Author : Anton Krouglov

Leave a Comment