≡ Menu

Windows CMD Commands

Generally the tech world sees Windows command line less powerful than what Linux’s command line can do. However, there are still lots of things one can do with the native available Windows commands, as this website shows all such tricks with examples. With the addition of PowerShell, I don’t think there is any limit for automating user or administration tasks.

This website is for all those people that love to use CMD commands and want to know more ways of automating administrator/user tasks. You can use the below list to know more about your favorite command. You can as well use search feature on the website to look for a specific command or a problem you are trying to solve.

CMD commands list

Microsoft published exhaustive list of Windows commands, which serves as online manual for each of the commands. This website adds on to that with illustration of real use cases and lists solutions using Windows commands & batch files. Refer the below index and follow the links for detailed syntax and examples.

At This Windows command helps to schedule tasks at specified time or recurring schedule.
Attrib Set file attributes
Bootcfg Enable kernel debugging
copy Copy files
Compact Compress or decompress files and directories
Echo Echo the command/contents of a file
Date Set system date and time
Del ‘Del’ command is used to delete files from CMD.
Dir ‘Dir’ command is used to list files and directories from CMD.
Eventquery.vbs View all events on Windows computer.
find Search files for a given string
findstr Search files for a given string; Has advanced options than find command.
for Windows batch command for looping over a list of items and performing repeated actions.
getmac ‘Getmac’ command is used to find physical MAC address of the network cards installed on the computer.
hostname Get name of your Windows computer.
logoff Logoff user session
Mkdir Create directories
More This windows command helps to print contents of a file on command windows, one page at a time. Provides same functionality as ‘Linux’ more command.
Net user ‘Net user’ command is used to manage user accounts like creating/deleting/locking/unlocking user accounts.
Net use Create/List/Delete network drives
Net localgroup Manage local computer’s user groups from CMD.
Net share Create / List/ Delete shares on the local computer
Reg Edit/create/delete registry keys from command prompt.
Rename Windows ‘Rename’ command is used to rename files and directories. This command can be referred/used as ‘ren’ too.
Rename files    Rename directories
Rmdir “Rmdir’ command is used to delete directories from CMD.
Robocopy Copy large number of files/folders from command prompt
Runas Run an application as a different user in the same session
Schtasks Schedule tasks
Shutdown As the name says, this Widnows command is used to shutdown a computer from CMD.
Shutdown Shutdown remote computer
Sort: Command for sorting text files
Systeminfo Command to get all system hardware/software information on command line
Tasklist List processes on command windows
Taskkill Kill processes from command prompt
Type Cat command for Windows. Prints the contents of file on command window
Xcopy Copy files and directories

 

Resource Kit Tools

Compress Compress a file from CMD
Srvinfo Get remote system information
tail Print the last lines of a file on command window
Ver Get Windows OS version

 

Other tools

PsShutdown.exe Shutdown remote computer
18 comments… add one
  • Anonymous

    How to open command prompt when there is no Run box in the start menu

    • Irina

      Dear ‘Anonymous’ user.
      If the “Run” application has not been placed in your Start menu, you can put it there by right-clicking on the Start menu and selecting “Properties”. From the Properties window you navigate to the “Start menu” tab and click the “Customize…” button. Almost at the bottom of that list you will have an option to place “Run” on the start menu.

      You may also access “Run” by pressing and holding down the following key-combination on your keyboard: [Win]+[R].

      In Windows Vista, Windows 7, Windows Server 2007 (?) and Windows Server 2008 (Including R2) you can also search for the “CMD” (Command Prompt) executable directly from the search field in the bottom of your Start menu.

      Lastly the CMD executable can be found as in the windows folder – as pointed out by another Anonymous user: c:\windows\system32\ <- cmd.exe is located here.

      Good luck.

      Another fun little trick lets you customize how CMD looks when you first start it up. By default it has some information about CMD being a Microsoft product whenever you open it.

      If you open "regedit" and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor you found see a REG called "AutoRun"
      (if not, you can safely create it by right-clicking, selecting "NEW" and choosing "Expandable String Value". Name it "AutoRun").

      In the data field you can put whatever you wish to see whenever you start CMD.
      For exmaple: cls&prompt CMD: &echo.&echo The time & date today is %DATE% – %TIME%

      It should look like this when you start CMD:

      The time & date today is 08.06.2012 – 12:58:30,52

      CMD:

      //Irina

  • Anonymous

    if you are using windows vista/7, then just type cmd.exe in search bar. If you are still in XP/2003, then navigate to c:\windows\system32\ folder and look for cmd.exe there.

    • Hassaan

      How can i find list of cmd command with usage

  • Firefox264

    Nice work. Very useful for Network admins and security experts. Thanks

  • Sathish

    Hi ,

    I wanna execute the .exe files in remote system remotely through my system command prompt. so can u help me regarding this..

    Thanks, sathish

    • admin

      You can use psexec tool for this.

  • Sameer

    how to get the list of all installed softwares in the system using command prompt for windows xp.

  • ice

    Hi, I just modified the registry with the suggestion from Irina, but how can I set it up, instead of dispaying “CMD” to display the drive letter like it does before making changes to the registry.

    Thank You

  • Rain

    Hi,

    if I want to only view one detail from “net user” is it possible?
    for example, i want to only see if the administrator account is active rather than the whole information from doing “net user administrator”, is it possible?~

    THANK YOUUU

    • admin

      Findstr is always handy for such cases, to filter out unnecessary details.
      You can try

      net user administrator | findstr /C:"Account active"
  • msadi

    which commands we need for Creation of user accounts by reading users names from a file ?

  • Joel

    After recovery i can’t log in anymore cause the password says was incorrect. How do i resolve this. I use all my password but still can’t log into my laptop but when i tried using my password for command prompt it works but not on log in windows.

  • Ijos

    Please how i can login to website with cmd ?

  • amarendra

    i disable my administrator account and i can’t enable by guest account. when i want to enable with guest account then give error message.
    what i do?????

  • RAIN2

    I am using the command prompt of Windows 10 OS.
    When I type the following command,
    D:\>cd d:\windows\system32\config
    and hit enter,
    I get this message, The syntax of the command is incorrect.
    Can you tell me what is wrong with the syntax of this command?

  • aman

    how do i create files using cmd other than touch

  • Dr-Zi

    I don’t know ho to delete display driver using commands
    Because I couldn’t access desktop ( flickering screen) and the only thing I can use is cmd

Leave a Comment