Difference between revisions of "Command Line Tools"

From TheBestLinux.com
Jump to navigation Jump to search
Line 16: Line 16:
 
*  recoverydrive.exe
 
*  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.
 
**  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.
 +
<br />
 +
Here is an example showing the full output of the command on a Windows 11 system:
 +
<pre style="colore:blue">
 +
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.
 +
</pre>
 +
<br />

Revision as of 19:55, 24 May 2023

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. 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.


  • 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.


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.