≡ Menu

Reference for Windows commands with examples

Below is the list of commands that can be run from windows command prompt (CMD). You can follow the link given for a command to see the syntax and examples.

At:Schedule tasks
Attrib:Set file attributes
Bootcfg:Enable kernel debugging
copy:Copy files
Compact:Compress or decompress files and directories
Date:Set system date and time
Del:Delete files
Dir:List files and directories
Eventquery.vbs:View events
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
getmac:Find mac address of the system
hostname:Get system name
logoff:Logoff user session
Net user:Manage user accounts
Net use:Create/List/Delete network drives
Net localgroup:Manage local computer’s user groups
Net share:Create / List/ Delete shares on the local computer
Reg:Edit/create/delete registry keys
Rename:Rename files
Rename:Rename directories
Runas:Run an application as a different user in the same session
Schtasks:Schedule tasks
Shutdown:Shutdown or reboot system
Sort:Command for sorting text files
Systeminfo:Get computer information
Taskkill:Kill processes
Xcopy:Copy 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
{ 10 comments… add one }
  • Anonymous May 10, 2011, 6:14 pm

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

    • Irina June 8, 2012, 10:58 am

      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 October 4, 2011, 6:12 pm

    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 October 12, 2011, 3:59 am

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

  • Sathish July 10, 2012, 5:55 am

    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 July 11, 2012, 12:53 pm

      You can use psexec tool for this.

  • Sameer September 17, 2012, 5:55 am

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

  • ice May 7, 2015, 4:07 pm

    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 May 18, 2015, 11:55 pm


    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 May 20, 2015, 9:30 pm

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

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

Leave a Comment