≡ Menu

Windows CMD commands

Below is the list of Windows CMD commands. You can follow the link given for a command to see the syntax and examples.

Windows native commands

AtSchedule tasks
AttribSet file attributes
BootcfgEnable kernel debugging
copyCopy files
CompactCompress or decompress files and directories
EchoEcho the command/contents of a file
DateSet system date and time
DelDelete files
DirList files and directories
Eventquery.vbsView events
findSearch files for a given string
findstrSearch files for a given string; Has advanced options than find command.
forWindows batch command for looping
getmacFind mac address of the system
hostnameGet system name
logoffLogoff user session
MkdirCreate directories
MoreMore command. Similar to Linux more command
Net userManage user accounts
Net useCreate/List/Delete network drives
Net localgroupManage local computer’s user groups
Net shareCreate / List/ Delete shares on the local computer
RegEdit/create/delete registry keys
RenameRename files
RenameRename directories
RmdirDelete directories
RobocopyCopy large number of files/folders
RunasRun an application as a different user in the same session
SchtasksSchedule tasks
ShutdownShutdown computer
ShutdownShutdown remote computer
Sort:Command for sorting text files
SysteminfoGet computer information
TasklistList processes
TaskkillKill processes
TypeCat command for Windows. Prints the contents of file on command window
XcopyCopy files and directories


Resource Kit Tools

CompressCompress a file
SrvinfoGet remote system information
tailPrint the last lines of a file
VerGet Windows OS version


Other tools

PsShutdown.exeShutdown remote computer
{ 13 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



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

  • 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


    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?~


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

Leave a Comment