< All Topics
Print

Obscure Windows Command-Line Utilities


🕵️‍♂️ Obscure Windows Command-Line Utilities

1. FSUTIL

Q: What is FSUTIL, and how can I use it to work with advanced file system features?

A: FSUTIL (File System Utility) is a power-user command that provides access to internal file system functions for NTFS volumes. It can perform many tasks not exposed in the regular Windows GUI or basic commands.

Obscure Use CaseCommand Example
View NTFS volume detailsfsutil fsinfo ntfsinfo C:
Create a dummy filefsutil file createnew <filename> <size_in_bytes> (e.g., fsutil file createnew test.dat 104857600 for a 100MB file)
Query file behaviorfsutil behavior query disabledeletenotify (Checks TRIM status for SSDs)

2. RELOG

Q: I have a massive performance monitor log file (.blg or .csv). Is there a quick command to convert it to a more manageable format?

A: Yes, the RELOG utility is designed to sample performance counter logs and convert them to different formats or reduce their sampling rate.

Example Usage:

DOS

relog "C:\Logs\big_perf.blg" -o "C:\Logs\small_perf.csv" -f csv -t 10

This command converts the binary log file (.blg) to a .csv file, sampling only every 10th record to reduce the file size.


3. WAITFOR

Q: Is there a native Windows command to make one batch script pause until a different computer on the network signals it to continue?

A: Yes, the WAITFOR command can create or wait for a named signal across a network. It’s a primitive form of inter-process communication (IPC) for batch files.

RoleCommand Example
Sending the Signalwaitfor /s <computer_name> /si "BuildComplete" (Signals another computer to proceed)
Waiting for the Signalwaitfor "BuildComplete" (Pauses the current script until the signal is received)

4. MKLINK

Q: I know about basic shortcuts, but how do I create a true symbolic link or junction point like in Linux/UNIX?

A: The MKLINK command is used for this. It’s essential for advanced file management, allowing you to effectively “trick” Windows into treating a folder or file located in one place as if it were stored in another.

Type of LinkCommand Parameter
Symbolic Link (File)mklink <Link> <TargetFile>
Symbolic Link (Directory)mklink /D <LinkDir> <TargetDir>
Directory Junctionmklink /J <LinkDir> <TargetDir>
Hard Link (File)mklink /H <Link> <TargetFile>

5. COMPACT

Q: Can I compress files and folders directly from the command line on an NTFS drive without using a ZIP program?

A: Yes, using the COMPACT command. It manages the NTFS built-in file compression feature.

Example Usage:

To compress the current directory recursively:

DOS

compact /c /s

6. TYPE + MORE

Q: I need to view a large text file in the command prompt, but it scrolls by too fast. Is there a way to pause the output page-by-page?

A: While TYPE displays file contents, piping its output to the MORE filter is the classic solution for pagination.

Example Usage:

DOS

type C:\Windows\System32\drivers\etc\hosts | more

Pressing Spacebar advances to the next page; pressing Enter advances one line.


7. DRIVERQUERY

Q: How can I quickly generate a list of all drivers installed on the system and export it?

A: The DRIVERQUERY command lists all installed device drivers and their properties.

Example Usage:

DOS

driverquery /fo csv > C:\driver_list.csv

This command formats the output as a CSV (Comma Separated Values) file and redirects it to the specified file, ready for viewing in a spreadsheet program.


8. TLNTADMN (or dism / pkgmgr)

Q: Where is the TELNET client command? It doesn’t seem to be installed by default anymore.

A: The TELNET client is a disabled “Windows Feature” by default on modern versions of Windows. You can enable it using the Deployment Image Servicing and Management (DISM) command, which makes the telnet.exe command available.

Example Usage (Requires Administrator privileges):

DOS

dism /online /enable-feature /featurename:TelnetClient

9. WINSAT

Q: How can I run the Windows System Assessment Tool (the old Windows Experience Index) from the command line?

A: The WINSAT (Windows System Assessment Tool) utility executes the performance tests used to rate the system.

Example Usage:

DOS

winsat formal

Running this executes a comprehensive set of tests and updates the system’s performance metrics, which you can later view in the log files.


10. SHUTDOWN /R /O

Q: Is there a one-line command to force a system reboot directly into the Advanced Startup Options menu (the menu that leads to Safe Mode and System Recovery)?

A: Yes, this combination of SHUTDOWN flags forces a restart and then displays the Advanced Boot Options Menu. It’s an indispensable trick for remote troubleshooting.

Example Usage:

DOS

shutdown /r /o /t 0
  • /r: Full reboot.
  • /o: Go to the advanced boot options menu.
  • /t 0: Immediate execution (zero second delay).