Jatin Sharma
Jatin Sharma's Blogs

Jatin Sharma's Blogs

Windows Commands CheatSheet you needed

Windows Commands CheatSheet you needed

Jatin Sharma's photo
Jatin Sharma
·Aug 17, 2022·

12 min read

Play this article

This is the Cheat Sheet of Windows Commands. It gives you all the commands and a short description of the command. I've also attached the documentation link for further reading.

What is Command Prompt in Windows?

Command Prompt, also known as cmd.exe is a command line interpreter application on Windows Operating System. It's used to execute entered commands.

What are the CMD Commands?

CMD Commands are the specific set of instructions given to Command Prompt to perform some kind of task or function on a Windows PC. Most of the Windows commands are used to automate tasks via scripts and batch files and perform advanced administrative tasks or functions. Many commands can help you troubleshoot and solve certain problems on windows.

Windows Commands List

arpDisplays and modifies the Internet-to-adapter address translation tables used by the Address in Networks and communication management
assocDisplays or modifies file name extension associations
attribDisplays, sets, or removes attributes assigned to files or directories.
bcdbootEnables you to quickly set up a system partition, or to repair the boot environment located on the system partition
bcdeditUsed to manage boot configuration data
bitsadminUsed to manage the Background intelligent Transfer Service
breakEnable/Disable break copability `CTRL+C` in CMD
caclsUsed to change permissions of files
callUsed one batch program to call another
certreqUsed to request certificates from a certification authority
certutilManage Certification Authority files and Services
cdUsed to change directory or go to a specific one
chcpDisplays the number of active console code page
chdirSame as cd command
chkdskUsed to check and repair issues in the disk
chkntfsUsed to check the NTFS file system
choicePrompts the user to select one item from a list of single-character choices in a batch program, and then returns the index of the selected choice. If used without parameters, choice displays the default choices Y and N.
cipherUsed to encrypt/decrypt file and folder
cleanmgrUsed to clean temp files and recycle bin automatically
clipCopy result of any command to windows clipboard
clsClear CMD screen
cmdUsed to start a new CMD shell
cmdkeyCreates, lists, and deletes stored user names and passwords or credentials.
cmstpUsed to install or remove a connection manage service profile
colorChange the color of the CMD shell using options
compCompare contents of two files or two sets of files
compactDisplays or alters the compression of files or directories on NTFS partitions
covertConverts a disk from one disk type to another.
copyCopy one or more files to another location
dateDisplays or sets the system date.
defragLocates and consolidates fragmented files on local volumes to improve system performance.
delDeletes one or more files.
dirUsed to display files and folder list
diskparthelps you manage your computer's drives (disks, partitions, volumes, or virtual hard disks)
dispdiagLogs display information to a file.
doskeyRecalls previously entered command-line commands, edits command lines, and creates macros.
driverqueryDisplay a list of installed device drivers and their properties
echoDisplays messages or turns on or off the command echoing feature
endlocalEnds localization of environment changes in a batch file
eraseUsed to delete one or more file
eventcreateEnables an administrator to create a custom event in a specified event log
exitExits the command interpreter or the current batch script.
expandExpands one or more compressed files
extrac32Extracts files from a cabinet or source.
fcCompares two files or sets of files and displays the differences between them.
findSearches for a string of text in a file or files, and displays lines of text that contain the specified string
findstrSearches for patterns of text in files
fingerDisplays information about users on a specified remote computer
fondueEnables Windows optional features by downloading required files from Windows Update or another source specified by Group Policy
forRuns a specified command for each file, within a set of files
forfilesSelects and runs a command on a file or set of files. This command is most commonly used in batch files
formatFormat a disk to accept Windows files. You must be a member of the Administrators group to format a hard drive
fsutilFile System utility to manage file and drive properties
ftpUse FTP service to transfer files from one PC to another
ftypeDisplay/Modify file extensions type associations
getmacUsed to display the MAC address of your network adapter
gotoUsed to direct a batch program to a line identified by a label
gpresultDisplay Group Policy Settings and Resultant Set of Policy for a user
gpupdateUpdates Group Policy settings
helpDisplays a list of the available commands or detailed help information on a specified command
hostnameDisplays the hostname portion of the full computer name of the computer
icaclsDisplays or modifies discretionary access control lists (DACLs) on specified files, and applies stored DACLs to files in specified directories
ifPerforms conditional processing in batch programs
ipconfigDisplay and change windows IP Configuration
klistDisplays a list of currently cached Kerberos tickets
ktmutilStarts the Kernel Transaction Manager utility
labelUsed to change the name of a disk
lodctrAllows you to register or save performance counter name and registry settings in a file and designate trusted services
logmanUsed to manage performance monitor logs
logoffLog a use off
makecabPackage existing files into a cabinet (.cab) file
mdCreates a directory or subdirectory
mkdirCreates a directory or subdirectory
mklinkCreates a directory or file symbolic or hard link
mmcAccess Microsoft Management Console
modeDisplays system status, changes system settings, or reconfigures ports or device
moreDisplays one screen of output at a time
mountvolCreates, deletes, or lists a volume mount point. You can also link volumes without requiring a drive letter
moveMoves one or more files from one directory to another directory
msdtInvokes a troubleshooting pack at the command line or as part of an automated script, and enables additional options without user input
msiexecProvides the means to install, modify, and perform operations on Windows Installer from the command line
msinfo32Display system information
mstscCreate a remote Desktop connection
nbtstatDisplays NetBIOS over TCP/IP (NetBT) protocol statistics
netcfgInstalls the Windows Preinstallation Environment (WinPE), a lightweight version of Windows used to deploy workstations
net printDisplays information about a specified printer queue or a specified print job, or controls a specified print job
netshDisplay or modify network configuration
netUsed to manage network resources and services
netstatDisplay active TCP/IP connections
nslookupDisplays information that you can use to diagnose Domain Name System (DNS) infrastructure
openfilesQueries or display open files
pathSet PATH environment variable for executable files
pathpingLatency and packet loss info for each node in the network path
pauseUsed to stop processing of a batch file
perfmonAccess Performance monitor in CMD
pingTest network connection to a computer
pktmonUsed for advanced packet capture and event collection, drop detection, filtering, and counting
pnpunattendAudits a computer for device drivers, and performs unattended driver installations, or searches for drivers without installing and, optionally, report the results to the command line
pnputilUsed to manage the driver store
popdGo to the latest path/folder stored by the PUSHD command
powerShellAccess Powershell
powerShell_iseWindows PowerShell Integrated Scripting Environment (ISE) is a graphical host application that enables you to read, write, run, debug, and test scripts
printUsed to print a text file from CMD
powercfgUsed to configure power settings and know battery health
promptDisplaying any text you want, such as the name of the current directory, the time and date, etc.
pushdStores the current directory for use by the popd command, and then changes to the specified directory
pwlauncherEnables or disables the Windows To Go Startup Options
rdDeletes a directory
recoverRecovers readable information from a bad or defective disk
ReFSUtilReFSUtil is a tool included in Windows and Windows Server that attempts to diagnose heavily damaged ReFS volumes
regPerforms operations on registry subkey information and values in registry entries
reginiModifies the registry from the command line or a script, and applies changes that were present in one or more text files
regsvr32Registers .dll files as command components in the registry
relogExtracts performance counters from performance counter logs into other formats, such as text-TSV (for tab-delimited text), text-CSV (for comma-delimited text), binary-BIN, or SQL
remRecords comments in a script, batch, or config.sys file. If no comment is specified, rem adds vertical spacing
renRenames files or directories
renameRenames files or directories
replaceReplace existing files in a directory. If used with the `/a` option, this command adds new files to a directory instead of replacing existing files
rmdirDeletes a directory
robocopyCopies file data from one location to another
routeDisplays and modifies the entries in the local IP routing table
rpcpingConfirms the RPC connectivity between the computer running Microsoft Exchange Server and any of the supported Microsoft Exchange Client workstations on the network
rundll32Loads and runs 32-bit dynamic-link libraries (DLLs)
rasdialDisplay Remote Access Service Status
runasRun a program as different user
scUse Service Controller to manage Windows services
schtasksSchedules commands and programs to run at a specific time
seceditConfigures and analyzes system security
setDisplays, sets, or removes `cmd.exe` environment variables
setxCreates or modifies environment variables in the user or system environment, without requiring programming or scripting
sfcScans and verifies the integrity of all protected system files and replaces incorrect versions with correct versions
shiftChanges the position of batch parameters in a batch file
shutdownEnables you to shut down or restart local or remote computers, one at a time.
sortReads input, sorts data, and writes the results to the screen, to a file, or another device
startStarts a separate Command Prompt window to run a specified program or command
substAssociates a path with a drive letter
sxstraceDiagnoses side-by-side problems
systeminfoDisplays detailed configuration information about a computer and its operating system
stringsFind ANSI and UNICODE strings in binary files
takeownUsed to take the ownership of a file
taskkillEnds one or more tasks or processes
tasklistDisplays a list of currently running processes on the local computer or a remote computer
tcmsetupEnable/Disable the TAPI client
telnetCommunicates with a computer running the telnet server service
timeDisplays or sets the system time
timeoutPauses the command processor for the specified number of seconds
titleCreates a title for the Command Prompt window
tpmtoolThis utility can be used to get information about the Trusted Platform Module (TPM).
tpmvscmgrThe tpmvscmgr command-line tool allows users with Administrative credentials to create and delete TPM virtual smart cards on a computer
tracerptThe tracerpt command parses Event Trace Logs, log files generated by Performance Monitor, and real-time Event Trace providers
tracertTrace route to a remote host by sending ICMP request messages
treeDisplays the directory structure of a path or of the disk in a drive graphically
typeDisplays the contents of a text file
typeperfwrites performance data to the command window or to a log file
tzutilDisplays the Windows Time Zone utility
unlodctrRemoves Performance counter names and Explains text for a service or device driver from the system registry
verDisplays the operating system version number
verifierDriver Verifier monitors Windows kernel-mode drivers and graphics drivers to detect illegal function calls or actions that might corrupt the system
verifyVerify whether files are saved correctly on the disk
volDisplays the disk volume label and serial number
vssadminShow shadow copy backups, installed shadow copy writers and providers
wbadminEnables you to back up and restore your operating system, volumes, files, folders, and applications from a command prompt
waitforSends or waits for a signal on a system
wecutilEnables you to create and manage subscriptions to events that are forwarded from remote computers
wevtutilEnables you to retrieve information about event logs and publishers
whereDisplays the location of files that match the given search pattern
whoamiDisplays user, group, and privileges information for the user who is currently logged on to the local system
winrsWindows Remote Management allows you to manage and execute programs remotely
winrmWindows Remote Management
wmicDisplays WMI information inside an interactive command shell.
wscriptWindows Script Host provides an environment in which users can execute scripts in a variety of languages that use a variety of object models to perform tasks
xcopyCopies files and directories, including subdirectories

Wrapping up

There are many more commands that I might have missed. If you enjoyed this article then don't forget to press ❤️.If you have any queries or suggestions don't hesitate to drop them. You can extend your support by Buying me a Coffee

Share this