Windows 11/10 includes a new command line tool StorDiag.exe or Storage Diagnostic Tool that allows System Administrators to collect and analyze storage-related data, which can help them troubleshoot Hard Disk and storage diagnostic issues. By running a single command, the tool can collect all storage and file system-related data and diagnostic logs and output them to a folder.
Storage Diagnostic Tool – StorDiag.exe
To use the StorDiag.exe tool, open an elevated command prompt, type the following and hit Enter:
The arguments that are available are:
- -collectEtw : Collect a 30-second long ETW trace if run from an elevated session
- -checkFSConsistency : Checks for the consistency of the NTFS file system
- -out <PATH> : Specify the output path. If not specified, logs are saved to %TEMP%\StorDiag
The syntax to be used is:
StorDiag [-collectEtw] [-out <PATH>]
So if you want to collect a ETW (Event Tracing for Windows) trace and check file system consistency, generate diagnostics logs and save them to your Desktop, run the following command:
stordiag.exe -collectEtw -checkFSConsistency -out %userprofile%\desktop
Once you start the task, you will see it carrying out several tasks, including running of ChkDsk, FSUtil, and so on. So instead of running tests individually, it will run several tests automatically, thereby saving IT Pros and System Administrators time.
After the task is over, it will output the log files in a folder and save it on your desktop:
You can choose any location to save the diagnostic files.
Hope you find the new tool in Windows 11/10 useful.