Command Line Tools

From TheBestLinux.com
Jump to navigation Jump to search

Windows Command Line Tools & Commands

Common to All Versions of Windows

Windows originally was an add-on to DOS, the Microsoft "Disk Operating System", in order to make it more user friendly and more appealing to new/novice computer users. It's commonly known as a "GUI", which stands for "Graphical User Interface".

To new users, the thought of typing manual commands from a black "DOS" screen can seem intimidating and complicated. However, there is MUCH power that is available in that dark deep hole most users don't bother with, known as the "Command Line". The "Real" power comes from creating scripts to make things easier, even to the point of automation. Scripts are merely one or more "DOS" commands saved as a file that can be run again and again, while modifying the script if needed to improved it's functionality.

Here is the beginning of my soon to become ever-growing list of commonly used, and not so commonly used command line commands, along with examples of their usage:

  • "netsh interface IPV6 set privacy state=disable"
    • Disables IPv6 on all network interfaces.


  • findstr
    • This command searches for text within a file. You can give it the -i flag to ignore case-sensitivity. It can also be used to find specific output of another command, using the pipe(|), which looks like a vertical line, and is usually typed using the key just above the "ENTER" key on the keyboard, requiring a "shift-backslash" to produce the "|" pipe symbol. This is known as piping the output of most commands into the "findstr" command.
    • Here's an example of piping the output of one command, the "ipconfig /all" command, into another command, in this case, the "findstr" command to search for all lines that contain "v4", which is this case, is only one, the line we want to see the IP address of the computer.
PS C:\Users\jamie> ipconfig /all | findstr v4
   IPv4 Address. . . . . . . . . . . : 192.168.200.210(Preferred)


  • recoverydrive.exe
    • Starts up the GUI to create a USB recovery drive, with the option of including backup copy of "System Files" on the USB device. Requires a new or empty USB drive with a 32GB capacity or greater.


  • net stats workstation OR net stats server
    • Displays statistics of a PC workstation or server. Among other information, it shows how long the computer has been powered up since last shutdown or restart. The line starting with "Statistics since" shows the date and time the computer was booted up. This is commonly known as the computer's "uptime".
    • Here is an example showing the full output of the command on a Windows 11 system:
PS C:\Users\jamie> net stats workstation
Workstation Statistics for \\WIN11VM05


Statistics since 5/11/2023 12:38:03 AM


  Bytes received                               0
  Server Message Blocks (SMBs) received        2
  Bytes transmitted                            0
  Server Message Blocks (SMBs) transmitted     0
  Read operations                              0
  Write operations                             0
  Raw reads denied                             0
  Raw writes denied                            0

  Network errors                               0
  Connections made                             0
  Reconnections made                           0
  Server disconnects                           0

  Sessions started                             0
  Hung sessions                                0
  Failed sessions                              0
  Failed operations                            0
  Use count                                    0
  Failed use count                             0

The command completed successfully.