The most useful Windows CMD commands reference

by admin on March 10, 2011

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
Cls:Clear command window screen
Compact:Compress or decompress files and directories
Convert:Convert FAT filesystem to NTFS
Date:Set system date and time
defrag:Defrag disk drives
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
ipconfig:Get IP address
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
Powercfg:Manage power scheme on your laptop
Reg:Edit/create/delete registry keys
Rename:Rename files/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
time:Set system time
Title:Set command window title
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

{ 7 comments… read them below or add one }

Anonymous May 10, 2011 at 6:14 pm

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

Reply

Irina June 8, 2012 at 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

CMD:

//Irina

Anonymous October 4, 2011 at 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.

Reply

Firefox264 October 12, 2011 at 3:59 am

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

Reply

Sathish July 10, 2012 at 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

Reply

admin July 11, 2012 at 12:53 pm

You can use psexec tool for this.

Sameer September 17, 2012 at 5:55 am

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

Reply

Leave a Comment

HTML tags are not allowed.

Previous post:

Next post: