CMD Commands
CMD Commands
CMD Commands
ADDUSERS ARP ASSOC ASSOCIAT ATTRIB b BCDBOOT Create or repair a system partition BOOTCFG Edit Windows boot settings BROWSTAT Get domain, browser and PDC info c CACLS CALL CD CHANGE CHKDSK CHKNTFS CHOICE CIPHER CleanMgr CLEARMEM CLIP CLS CLUSTER CMD CMDKEY COLOR COMP COMPACT COMPRESS CON2PRT CONVERT COPY CSCcmd CSVDE d DATE DEFRAG DEL DELPROF DELTREE DevCon DIR DIRUSE DISKCOMP DISKCOPY DISKPART DNSSTAT Display or set the date Defragment hard drive Delete one or more files Delete NT user profiles Delete a folder and all subfolders Device Manager Command Line Utility Display a list of files and folders Display disk usage Compare the contents of two floppy disks Copy the contents of one floppy disk to another Disk Administration DNS Statistics Change file permissions Call one batch program from another Change Directory - move to a specific Folder Change Terminal Server Session properties Check Disk - check and repair disk problems Check the NTFS file system Accept keyboard input to a batch file Encrypt or Decrypt files/folders Automated cleanup of Temp files, recycle bin Clear memory leaks Copy STDIN to the Windows clipboard. Clear the screen Windows Clustering Start a new CMD shell Manage stored usernames/passwords Change colors of the CMD window Compare the contents of two files or sets of files Compress files or folders on an NTFS partition Compress individual files on an NTFS partition Connect or disconnect a Printer Convert a FAT drive to NTFS. Copy one or more files to another location Client-side caching (Offline Files) Import or Export Active Directory data Add or list users to/from a CSV file Address Resolution Protocol Change file extension associations One step file association Change file attributes
DOSKEY Edit command line, recall commands, and create macros DSACLs Active Directory ACLs DSAdd Add items to active directory (user group computer) DSGet View items in active directory (user group computer) DSQuery Search for items in active directory (user group computer) DSMod Modify items in active directory (user group computer) DSMove Move an Active directory Object DSRM Remove items from Active Directory e ECHO Display message on screen ENDLOCAL End localisation of environment changes in a batch file ERASE Delete one or more files EVENTCREATE Add a message to the Windows event log EXIT Quit the current script/routine and set an errorlevel EXPAND Uncompress files EXTRACT Uncompress CAB files f FC Compare two files FIND Search for a text string in a file FINDSTR Search for strings in files FOR /F Loop command: against a set of files FOR /F Loop command: against the results of another command FOR Loop command: all options Files, Directory, List FORFILES Batch process multiple files FORMAT Format a disk FREEDISK Check free disk space (in bytes) FSUTIL File and Volume utilities FTP File Transfer Protocol FTYPE Display or modify file types used in file extension associations g GLOBAL Display membership of global groups GOTO Direct a batch program to jump to a labelled line GPUPDATE Update Group Policy settings h HELP Online Help i iCACLS Change file and folder permissions IF Conditionally perform a command IFMEMBER Is the current user in an NT Workgroup IPCONFIG Configure IP k KILL Remove a program from memory
l LABEL LOCAL LOGEVENT LOGMAN LOGOFF LOGTIME m MAPISEND Send email from the command line MBSAcli Baseline Security Analyzer. MEM Display memory usage MD Create new folders MKLINK Create a symbolic link (linkd) MODE Configure a system device MORE Display output, one screen at a time MOUNTVOL Manage a volume mount point MOVE Move files from one folder to another MOVEUSER Move a user from one domain to another MSG Send a message MSIEXEC Microsoft Windows Installer MSINFO Windows NT diagnostics MSTSC Terminal Server Connection (Remote Desktop Protocol) MV Copy in-use files n NET Manage network resources NETDOM Domain Manager NETSH Configure Network Interfaces, Windows Firewall & Remote access NETSVC Command-line Service Controller NBTSTAT Display networking statistics (NetBIOS over TCP/IP) NETSTAT Display networking statistics (TCP/IP) NOW Display the current Date and Time NSLOOKUP Name server lookup NTBACKUP Backup folders to tape NTRIGHTS Edit user account rights o OPENFILES Query or display open files p PATH Display or set a search path for executable files PATHPING Trace route plus network latency and packet loss PAUSE Suspend processing of a batch file and display a message PERMS Show permissions for a user PERFMON Performance Monitor PING Test a network connection POPD Restore the previous value of the current directory saved by PUSHD PORTQRY Display the status of ports and services POWERCFG Configure power settings Edit a disk label Display membership of local groups Write text to the NT event viewer Manage Performance Monitor Log a user off Log the date and time in a file
PRINT Print a text file PRINTBRM Print queue Backup/Recovery PRNCNFG Display, configure or rename a printer PRNMNGR Add, delete, list printers set the default printer PROMPT Change the command prompt PsExec Execute process remotely PsFile Show files opened remotely PsGetSid Display the SID of a computer or a user PsInfo List information about a system PsKill Kill processes by name or process ID PsList List detailed information about processes PsLoggedOn Who's logged on (locally or via resource sharing) PsLogList Event log records PsPasswd Change account password PsService View and control services PsShutdown Shutdown or reboot a computer PsSuspend Suspend processes PUSHD Save and then change the current directory q QGREP Search file(s) for lines that match a given pattern. r RASDIAL Manage RAS connections RASPHONE Manage RAS connections RECOVER Recover a damaged file from a defective disk. REG Registry: Read, Set, Export, Delete keys and values REGEDIT Import or export registry settings REGSVR32 Register or unregister a DLL REGINI Change Registry Permissions REM Record comments (remarks) in a batch file REN Rename a file or files REPLACE Replace or update one file with another RD Delete folder(s) RMTSHARE Share a folder or a printer ROBOCOPY Robust File and Folder Copy ROUTE Manipulate network routing tables RUN Start | RUN commands RUNAS Execute a program under a different user account RUNDLL32 Run a DLL command (add/remove print connections) s SC Service Control SCHTASKS Schedule a command to run at a specific time SCLIST Display NT Services SET Display, set, or remove environment variables SETLOCAL Control the visibility of environment variables SETX Set environment variables permanently SFC System File Checker SHARE List or edit a file share or print share
SHIFT Shift the position of replaceable parameters in a batch file SHORTCUT Create a windows shortcut (.LNK file) SHOWGRPS List the NT Workgroups a user has joined SHOWMBRS List the Users who are members of a Workgroup SHUTDOWN Shutdown the computer SLEEP Wait for x seconds SLMGR Software Licensing Management (Vista/2008) SOON Schedule a command to run in the near future SORT Sort input START Start a program or command in a separate window SU Switch User SUBINACL Edit file and folder Permissions, Ownership and Domain SUBST Associate a path with a drive letter SYSTEMINFO List system configuration t TASKLIST List running applications and services TASKKILL Remove a running process from memory TIME Display or set the system time TIMEOUT Delay processing of a batch file TITLE Set the window title for a CMD.EXE session TLIST Task list with full path TOUCH Change file timestamps TRACERT Trace route to a remote host TREE Graphical display of folder structure TSSHUTDN Remotely shut down or reboot a terminal server TYPE Display the contents of a text file TypePerf Write performance data to a log file u USRSTAT List domain usernames and last login v VER Display version information VERIFY Verify that files have been saved VOL Display a disk label w WHERE Locate and display files in a directory tree WHOAMI Output the current UserName and domain WINDIFF Compare the contents of two files or sets of files WINMSD Windows system diagnostics WINMSDP Windows system diagnostics II WINRM Windows Remote Management WINRS Windows Remote Shell WMIC WMI Commands WUAUCLT Windows Update x XCACLS Change file and folder permissions XCOPY Copy files and folders
commands 2digg
A
assoc arp
Description
Displays or modifies file extension associations. Displays and modifies the IP-to-Physical address translation tables used by address resolution protocol (ARP). The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command. Displays or changes file attributes. Displays or changes the audit policy.
at
attrib auditpol
B
break bcdedit
Sets or clears extended CTRL+C checking. Sets properties in boot database to control boot loading. This command line tool can be used to configure, query, change or delete the boot entry settings in the BOOT.INI file. BITS administration utility.
bootcfg bitsadmin
C
cacls call cd certreq certutil change chcp chdir chglogon chgport chgusr
Displays or modifies access control lists (ACLs) of files. Calls one batch program from another. Displays the name of or changes the current directory. Manages certificates with certificate authorities. Advanced certificate utility. Displays or sets the active code page number. Displays the name of or changes the current directory. Enable or disable session logins. List or change COM port mappings for DOS application compatibility. Change Install Mode.
Checks a disk and displays a status report. Displays or modifies the checking of disk at boot time. This tool allows users to select one item from a list of choices and returns the index of the selected choice. Displays or alters the encryption of directories [files] on NTFS partitions. Sql server client network utility. Create network protocol connections to specified servers, and change the default network protocol. Display information about the network libraries currently installed on the system. Display the DB-Library version currently installed on the system, and set defaults for DBLibrary options Redirects output of command line tools to the Windows clipboard. This text output can then be pasted into other programs. Clears the screen. Starts a new instance of the Windows command interpreter. Creates, displays, and deletes stored user names and passwords. Connection manager profile installer Sets the default console foreground and background colors. Compares the contents of two files or sets of files. Displays or alters the compression of files on NTFS partitions. Computer Management in Windows Vista . Computer Defaults in Windows Vista. Opens up Windows control panel from the command line. Converts FAT volumes to NTFS. You cannot convert the current drive. Copies one or more files to another location.
cliconfig
clip
cls cmd cmdkey cmstp color comp compact compmgmtlauncher computerdefaults control convert copy
credwiz cscript
User credential wizard in Windows - allows you to import stored user names and passwords from a backup file. Debug and execute scripts.
D
date defrag dcomcnfg debug del deviceproperties dfrgui dialer diantz dir diskcomp diskcopy diskpart diskperf dispdiag doskey dpiscaling driverquery drwatson dvdplay dxdiag
Displays or sets the date. Locates and consolidates fragmented files on local volumes to improve system performance. Com+ management tool Runs Debug, a program testing and editing tool. Deletes one or more files. Opens up Windows device properties. Opens disk defragmenter gui application. Windows Phone dialer application. Cabinet Maker - Lossless Data Compression Tool. Displays a list of files and subdirectories in a directory. Compares the contents of two floppy disks. Copies the contents of one floppy disk to another. Displays or configures Disk Partition properties. Enable or disable disk performance counters. Logs display information to a file in the current directory. Edits command lines, recalls Windows commands, and creates macros. Opens dpi scaling window in control panel. Displays current device driver status and properties. Opens up drwatson fault checking utility Opens Windows Media Player to play DVDs. DirectX diagnostic tool.
E
echo
off.
edlin endlocal erase esentutl
Line operated text editor. Ends localization of environment changes in a batch file. Deletes one or more files. Extensible storage engine for microsoft windows version 6. You can use Private Character Editor to create your own characters, which you can then insert into documents by using Character Map. This command line tool enables an administrator to create a custom event ID and message in a specified event log. Opens up Windows event viewer. Converts .EXE (executable) files to binary format. Quits the CMD.EXE program (command interpreter). Expands one or more compressed files.
eudcedit
F
fc find findstr
Compares two files or sets of files, and displays the differences between them. More control than the comp command. Searches for a text string in a file or files. Searches for strings in files. Opens up Firewall settings in Windows . Allows you to manage filters. Allows you to view font file. Runs a specified command for each file in a set of files. Selects a file (or set of files) and executes a command on that file. This is helpful for batch jobs. Formats a disk for use with Windows. Displays or configures the file system properties. Transfers files to and from a computer running an FTP server service
firewallcontrolpanel Opens up Firewall in Control Panel. firewallsettings fltmc fontview for forfiles format fsutil ftp
Displays or modifies file types used in file extension associations. BitLocker updater. Opens up the fax cover page editor in Windows. Fax unattended setup program
G
getmac goto gpresult gpupdate graftabl grpconv
This tool enables an administrator to display the MAC address for network adapters on a system. Directs the Windows command interpreter to a labeled line in a batch program. Displays Group Policy information for machine or user. Allows you to update group policy settings straight away. Enables Windows to display an extended character set in graphics mode. Windows Progman Group Converter.
H
hdwwiz help hostname
Opens Windows Add Hardware wizard. Provides Help information for Windows commands. Prints name of the cureent host.
I
icacls ieunatt iexpress if ipconfig iscsicli iscsicpl
Display, modify, backup, or restore ACLs for files and directories. IE7 unattended install utility. Performs conditional processing in batch programs. Allows you to get adaptor specific information as well as modify dhcp and dns settings. iSCSI discovery tool. iSCSI initiator discovery tool.
L
label lodctrl logman logoff lpksetup lpremove lsm
Creates, changes, or deletes the volume label of a disk. Allows you to modify data collectors. Terminates a session. Language pack installer. Language pack scheduled task utility. Local session manager.
M
magnify makecab mblctr md mdres mdshed mem mkdir mklink migautoplay mmc mobsync mode more move mountvol mrinfo mrt msconfig msdt
Opens up the Windows Magnifier application. Cabinet Maker - Lossless Data Compression Tool. Windows mobility center (mobile pcs). Creates a directory. Opens the memory diagnostic tool to check for errors in memory. Memory diagnostic scheduler. Displays the amount of used and free memory in your system. Creates a directory. Creates Symbolic Links and Hard Links Opens up windows easy transfer wizard. Opens up the Microsoft Management Console. Sync mobile devices (opens up sync center) Configures a system device. Displays output one screen at a time. Moves one or more files from one directory to another directory. Creates, deletes, or lists a volume mount point. Allows you to send IGMP and SNMP queries. Windows Malicious software removal tool. System configuration utility. Microsoft Support diagnostics tool.
Sends a message to a user on the network. Gives you granular control over the installation of applications. Opens up windows system information. Opens up Windows Paintbrush application from the command prompt. Remote assistance command line utility. Remote desktop cfonnection command line utility. Migration table editor.
N
narrator nbstat net net1 netcfg netplwiz netproj netsh netstat nlsfunc notepad nslookup ntprint
Microsoft Narrator Windows Application. Displays protocol statistics and current TCP/IP connections using NBT (NetBIOS over TCP/IP). Allows you to view and edit network configuration. Allows you to view and edit network configuration. winPE Network Installer. Advanced user account wizard. Opens up Windows Network Projector Application. Allows network scripts and configuration. Displays protocol statistics and current TCP/IP network connections. Loads country-specific information. Opens up Notepad Windows Application. Allows name server lookup. Printer Driver software installation.
O
ocsetup odbcconf openfiles optionalfeatures osk
Windows operational component setup Provides various mdac install actions. Displays files opened by remote users for a file share. Turns Windows Features on or off. Opens up the On-Screen Keyboard Windows
Application.
P
p2phost pathping path pause pcaelv perfmon ping pkgmgr pnpunattend pnputil popd
Opens the People Near Me Windows client. Allows you to ping with specific amounts of hops. Displays or sets a search path for executable files. Suspends processing of a batch file and displays a message. Program Compatibility Assistant. Opens the Performance Monitor windows Application. Allows you to query an IP address. Windows Package Manager. AuditSystem, Unattend online driver install. PnP driver command line utility. Restores the previous value of the current directory saved by PUSHD. This command line tool enables users to control the power settings on a system. Prints a text file. Changes the Windows command prompt. Saves the current directory then changes it.
Q
query
Displays information about processes, terminal sessions, available terminal servers on the network and information about users logged on to the system. Display information about users logged on to the system.
quser
R
rd recover regedit rem
Removes a directory. Recovers readable information from a bad or defective disk. Runs the Windows registry from the command line. Records comments (remarks) in batch files or
CONFIG.SYS.
ren rename rmdir robocopy
Renames a file or files. Renames a file or files. Removes a directory. Advanced utility to copy files and directory trees
S
set setlocal sc schtasks shift shutdown sort start subst systeminfo
Displays, sets, or removes Windows environment variables. Begins localization of environment changes in a batch file. Displays or configures services (background processes). Schedules commands and programs to run on a computer. Shifts the position of replaceable parameters in batch files. Allows proper local or remote shutdown of machine. Sorts input. Starts a separate window to run a specified program or command. Associates a path with a drive letter. Displays machine specific properties and configuration.
T
tasklist taskkill time title tracert tree type
Displays all currently running tasks including services. Kill or stop a running process or application. Displays or sets the system time. Sets the window title for a CMD.EXE session. Traces the route to a hostname with hostname resolution. Graphically displays the directory structure of a drive or path. Displays the contents of a text file.
V
ver verify vol
Displays the Windows version. Tells Windows whether to verify that your files are written correctly to a disk. Displays a disk volume label and serial number.
W
where
Displays the location of files that match the search pattern. By default, the search is done along the current directory and in the paths specified by the PATH environment variable. This utility can be used to get user name and group information along with the respective security identifiers (SID), privileges, logon identifier (logon ID) for the current user (access token) on the local system. i.e. who is the current logged on user? If no switch is specified, tool displays the user name in NTLM format (domain\username). Displays WMI information inside interactive command shell.
whoami
wmic
X
xcopy