How to run a disk test with CHKDSK
-
I'm trying to run the chkdsk command, but it's not working.
It is possible to execute it through triggercmd?. -
@fcovalls, I was able to run chkdsk with this command line as a background command:
chkdsk d: /scan
You might want to send the output to a log file though so you can see what it did, like this:
chkdsk d: /scan > d:\tools\chkdsk.log
chkdsk won't run in foreground mode because it requires elevated privileges.
-
Hi, Russ,
It doesn't work, it indicates that it requires elevated privileges.
Also in backgroud. -
@fcovalls, that's odd. It worked for me as a background command. It should work because background commands run in the context of the TRIGGERcmdAgent Windows service which runs as Local System, which should allow elevated commands to run.
This is what I see in the log when I ran it via TRIGGERcmd:
D:\tools>type chkdsk.log The type of the file system is NTFS. Stage 1: Examining basic file system structure ... 1139968 file records processed. File verification completed. 6948 large file records processed. 0 bad file records processed. Stage 2: Examining file name linkage ... 725 reparse records processed. 1477194 index entries processed. Index verification completed. 0 unindexed files scanned. 0 unindexed files recovered to lost and found. 725 reparse records processed. Stage 3: Examining security descriptors ... Security descriptor verification completed. 168614 data files processed. CHKDSK is verifying Usn Journal... 37970336 USN bytes processed. Usn Journal verification completed. Windows has scanned the file system and found no problems. No further action is required. 732469247 KB total disk space. 614040080 KB in 964604 files. 410280 KB in 168615 indexes. 0 KB in bad sectors. 1267367 KB in use by the system. 65536 KB occupied by the log file. 116751520 KB available on disk. 4096 bytes in each allocation unit. 183117311 total allocation units on disk. 29187880 allocation units available on disk.