Command Prompt on Windows is a powerful tool with nearly 300 commands to perform various functions. Some are now depreciated. You can perform various system tasks using the commands on Command Prompt. In this post, we have compiled the complete list of Command Prompt commands that are currently in use, from various documents on Microsoft.com and its subdomains. This list is long to follow but will certainly be a guide for you with all the working commands in a single location.
Complete list of Command Prompt commands
The following is the complete list of 293 Command Prompt commands you can use to do various tasks on the system.
Command Prompt Command | Function or Usage |
addusers | Addusers command is used to add or list users to and from a CSV file |
append | Allows programs to open data files in specified directories as if they were in the current directory. If used without parameters, the append displays the appended directory list. |
arp | This command is used to display or modify entries in the Address Resolution Protocol Cache. |
assoc | The Assoc command is used to display or modify the file type associated with a particular file extension. |
at | This command is used to schedule commands and programs to run at a particular date and time. |
attrib | This command is used to change the attributes of a file or a directory. |
auditpol | Auditpol command is used to display or change audit policies on the System. |
bcdboot | Bcdboot command enables you to set up system partition quickly, or to repair the boot environment on the system partition. The system partition is set up by copying a simple set of Boot Configuration Data (BCD) files to an existing empty partition |
bcdedit | Bcdedit is used to manage BCD stores. It can be used in different instances like creating new stores, modifying existing ones, adding boot menu parameters, etc. |
bdehdcfg | This command prepares a hard drive with the partitions for BitLocker Drive Encryption. |
bitsadmin | Bitsadmin command-line tool is used to create, download or upload jobs and to monitor their progress. |
bootcfg | Bootcfg command is used to configure, make queries, or change Boot.ini file settings. |
break | Break command sets or clears extended CTRL+C checking on MS-DOS systems. If used without parameters, break displays the existing setting value. |
cacls | Cacls command is used to display or modify discretionary access control lists (DACL) on specified files |
call | Call command is used to Calls one batch program from another without stopping the parent batch program. The call command accepts labels as the target of the call. It has no effect at the Command Prompt when used outside of a script or batch file. |
cd | Cd command is used to display the name of the current directory or change the current directory. If you use cd without parameters, it displays the current drive and directory. It is the same as chdir command. |
certreq | The Certreq command is used to request certificates from the Certification Authority. You can also retrieve a response to a previous request from a CA, to create a new request from a .inf file, accept and install a response to a request, to construct a cross-certification or qualified subordination request from an existing CA certificate or request, and to sign a cross-certification or qualified subordination request. |
certutil | Certutil is a command-line tool available as a part of Certificate Services. You can use this command to dump and display certification authority configuration information, configure Certificate service, backup and restore CA components, and verify certificates, key pairs, and certificate chains. If certutil is run on a certification authority without additional parameters, it displays the current certification authority configuration. |
change | Change command is used to change Remote Desktop Session Host server settings for logons, COM port mappings, and install mode. |
chcp | Chcp command-line tool is used to change the active console code page. If you use it without any parameter, it displays the number of the active console code page. |
chdir | Chdir command is used to display the name of the current directory or change the current directory. If you use cd without parameters, it displays the current drive and directory. |
chglogon | Chglogon command is used to enable or disable logons from client sessions on an Remote Desktop Session Host server or is used to display the current login status. |
chgport | Chgport command lists or changes the COM port mappings to be compatible with MS-DOS applications. |
chgusr | Chgusr changes the install mode for the Remote Desktop Session Host Server. |
chkdsk | Chkdsk command is used to check the file system and file system metadata of a volume for logical and physical errors. If used without parameters, chkdsk displays only the status of the volume and does not fix any errors. If used with the /f, /r, /x, or /b parameters, it fixes errors on the volume. |
chkntfs | Chkntfs command Displays or modifies automatic disk checking when the computer is started. If used without options, chkntfs displays the file system of the specified volume. If automatic file checking is scheduled to run, chkntfs displays whether the specified volume is dirty or is scheduled to be checked the next time the computer is started. |
choice | Choice command prompts 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. |
cipher | Displays or alters the encryption of directories and files on NTFS volumes. If used without parameters, cipher displays the encryption state of the current directory and any files it contains. |
cleanmgr | Cleanmgr command clears unnecessary files from your computer’s hard disk. You can use command-line options to specify that Cleanmgr cleans up Temp files, Internet files, downloaded files, and Recycle Bin files. You can then schedule the task to run at a specific time by using the Scheduled Tasks tool. |
clip | Clip command redirects the command output from the command line to the Windows clipboard. You can use this command to copy data directly into any application that can receive a text from the Clipboard. You can also paste this text output into other programs. |
cls | Cls command is used to clear the command prompt window. |
cmd | Cmd command starts a new instance of Cmd.exe. If used without parameters, cmd displays the version and copyright information of the operating system. |
cmdkey | Cmdkey creates, lists, and deletes stored user names and passwords or credentials. |
cmstp | Cmstp command installs or removes a Connection Manager service profile. Used without optional parameters, cmstp installs a service profile with default settings appropriate to the operating system and to the user’s permissions. |
color | Color command changes the foreground and background colors in the Command Prompt window for the current session. If used without parameters, color restores the default Command Prompt window foreground and background colors. |
comp | Compares the contents of two files or sets of files byte-by-byte. These files can be stored on the same drive or on different drives, and in the same directory or in different directories. When this command compares files, it displays their location and file names. If used without parameters, comp prompts you to enter the files to compare. |
compact | Compact displays or alters the compression of files or directories on NTFS partitions. If used without parameters, compact displays the compression state of the current directory and any files it contains. |
convert | Converts a disk from one disk type to another |
copy | Copies one or more files from one location to another. |
cscript | Cscript command starts a script to run in a command-line environment. |
date | Date command displays or sets the system date. If used without parameters, date displays the current system date setting and prompts you to enter a new date. |
defrag | Defrag command locates and consolidates fragmented files on local volumes to improve system performance. |
del | Del command Deletes one or more files. This command performs the same actions as the erase command.
The del command can also run from the Windows Recovery Console, using different parameters. |
delete | Deletes a partition or a volume. It also deletes a dynamic disk from the list of disks. |
dir | Displays a list of a directory’s files and subdirectories. If used without parameters, this command displays the disk’s volume label and serial number, followed by a list of directories and files on the disk (including their names and the date and time each was last modified). For files, this command displays the name extension and the size in bytes. This command also displays the total number of files and directories listed, their cumulative size, and the free space (in bytes) remaining on the disk. |
diskcomp | Compares the contents of two floppy disks. If used without parameters, diskcomp uses the current drive to compare both disks. |
diskcopy | Copies the contents of the floppy disk in the source drive to a formatted or unformatted floppy disk in the destination drive. If used without parameters, diskcopy uses the current drive for the source disk and the destination disk. |
diskpart | The diskpart command interpreter helps you manage your computer’s drives (disks, partitions, volumes, or virtual hard disks). |
diskperf | The diskperf command remotely enables or disables physical or logical disk performance counters on computers running Windows. |
diskraid | Diskraid is a command-line tool that enables you to configure and manage a redundant array of independent (or inexpensive) disks (RAID) storage subsystems. |
dism | Dism command starts the Deployment Image Servicing and Management tool (DISM) |
dispdiag | Logs display information in a file. |
dnscmd | A command-line interface for managing DNS servers. This utility is useful in scripting batch files to help automate routine DNS management tasks or to perform simple unattended setup and configuration of new DNS servers on your network. |
doskey | Calls Doskey.exe, which recalls previously entered command-line commands, edits command lines, and creates macros. |
driverquery | Enables an administrator to display a list of installed device drivers and their properties. If used without parameters, driverquery runs on the local computer. |
echo | Displays messages or turns on or off the command echoing feature. If used without parameters, echo displays the current echo setting. |
edit | Starts the MS-DOS Editor, which creates and changes ASCII text files. |
endlocal | Ends localization of environment changes in a batch file and restores environment variables to their values before the corresponding setlocal command was run. |
erase | Deletes one or more files. If you use erase to delete a file from your disk, you can’t retrieve it. |
eventcreate | Enables an administrator to create a custom event in a specified event log. |
eventcmd | Configures the translation of events to traps, trap destinations, or both based on information in a configuration file. |
exec | Runs a script file on the local computer. This command also duplicates or restores data as part of a backup or restore sequence. If the script fails, an error is returned and DiskShadow quits. |
exit | Exits the command interpreter or the current batch script. |
expand | Expands one or more compressed files. You can also use this command to retrieve compressed files from distribution disks. |
expose | Exposes a persistent shadow copy as a drive letter, share, or mount point. |
extend | Extends the volume or partition with focus and its file system into free (unallocated) space on a disk. |
extract / extrac32 | Extracts files from a cabinet or source. |
fc | Compares two files or sets of files and displays the differences between them. |
filesystems | Displays information about the current file system of the volume with focus and lists the file systems that are supported for formatting the volume. A volume must be selected for this operation to succeed. |
find | Searches for a string of text in a file or files, and displays lines of text that contain the specified string. |
findstr | Searches for patterns of text in files. |
flattemp | Enables or disables flat temporary folders. You must have administrative credentials to run this command. |
fondue | Enables Windows optional features by downloading required files from Windows Update or another source specified by Group Policy. The manifest file for the feature must already be installed in your Windows image. |
for | Runs a specified command for each file, within a set of files. |
forfiles | Selects and runs a command on a file or set of files. This command is most commonly used in batch files. |
format | Formats a disk to accept Windows files. You must be a member of the Administrators group to format a hard drive. |
freedisk | Checks to see if the specified amount of disk space is available before continuing with the installation process. |
fsutil | Performs tasks that are related to file allocation table (FAT) and NTFS file systems, such as managing to reparse points, managing sparse files, or dismounting a volume. If it’s used without parameters, fsutil displays a list of supported subcommands. |
ftp | Transfers files to and from a computer running a File Transfer Protocol (ftp) server service. This command can be used interactively or in batch mode by processing ASCII text files. |
ftype | Displays or modifies file types that are used in file name extension associations. If used without an assignment operator (=), this command displays the current open command string for the specified file type. If used without parameters, this command displays the file types that have open command strings defined. |
fveupdate | FveUpdate is an internal tool, used by the setup program when a computer is upgraded. It updates the metadata associated with BitLocker to the latest version. This tool cannot be run independently. |
getmac | Returns the media access control (MAC) address and list of network protocols associated with each address for all network cards in each computer, either locally or across a network. This command is particularly useful either when you want to enter the MAC address into a network analyzer, or when you need to know what protocols are currently in use on each network adapter on a computer. |
goto | Directs cmd.exe to a labeled line in a batch program. Within a batch program, this command directs command processing to a line that is identified by a label. When the label is found, processing continues starting with the commands that begin on the next line. |
gpfixup | Fixes domain name dependencies in Group Policy Objects and Group Policy links after a domain rename operation. To use this command, you must install Group Policy Management as a feature through Server Manager. |
gpresult | Displays the Resultant Set of Policy (RSoP) information for a remote user and computer. To use RSoP reporting for remotely targeted computers through the firewall, you must have firewall rules that enable inbound network traffic on the ports. |
gpt | On basic GUID partition table (gpt) disks, this command assigns the gpt attribute(s) to the partition with focus. Gpt partition attributes give additional information about the use of the partition. Some attributes are specific to the partition type GUID. You must choose a basic gpt partition for this operation to succeed. |
gpupdate | Updates Group Policy settings. |
graftabl | Enables Windows operating systems to display an extended character set in graphics mode. If used without parameters, graftabl displays the previous and the current code page. |
help | Displays a list of the available commands or detailed help information on a specified command. If used without parameters, help lists and briefly describes every system command. |
hostname | Displays the host name portion of the full computer name of the computer. |
icacls | Displays or modifies discretionary access control lists (DACLs) on specified files, and applies stored DACLs to files in specified directories. |
if | Performs conditional processing in batch programs. |
Import (diskshadow) | Imports a transportable shadow copy from a loaded metadata file into the system. |
Import (diskpart) | Imports a foreign disk group into the disk group of the local computer. This command imports every disk that is in the same group as the disk with focus. |
inactive | Marks the system partition or boot partition with focus as inactive on basic master boot record (MBR) disks. |
inuse | The inuse command has been deprecated and isn’t guaranteed to be supported in future releases of Windows. |
ipconfig | Displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without parameters, ipconfig displays Internet Protocol version 4 (IPv4) and IPv6 addresses, subnet mask, and default gateway for all adapters. |
ipxroute | Displays and modifies information about the routing tables used by the IPX protocol. Used without parameters, ipxroute displays the default settings for packets that are sent to unknown, broadcast, and multicast addresses. |
irftp | Sends files over an infrared link. |
jetpack | Compacts a Windows Internet Name Service (WINS) or Dynamic Host Configuration Protocol (DHCP) database. We recommend you compact the WINS database whenever it approaches 30 MB.
Jetpack.exe compacts the database by:
|
klist | Displays a list of currently cached Kerberos tickets. |
ksetup | Performs tasks related to setting up and maintaining Kerberos protocol and the Key Distribution Center (KDC) to support Kerberos realms. Specifically, this command is used to:
|
ktmutil | Starts the Kernel Transaction Manager utility. If used without parameters, ktmutil displays available subcommands. |
ktpass | Configures the server principal name for the host or service in Active Directory Domain Services (AD DS) and generates a .keytab file that contains the shared secret key of the service. The .keytab file is based on the Massachusetts Institute of Technology (MIT) implementation of the Kerberos authentication protocol. The ktpass command-line tool allows non-Windows services that support Kerberos authentication to use the interoperability features provided by the Kerberos Key Distribution Center (KDC) service. |
label | Creates, changes, or deletes the volume label (that is, the name) of a disk. If used without parameters, the label command changes the current volume label or deletes the existing label. |
list | Displays a list of disks, of partitions in a disk, of volumes in a disk, or of virtual hard disks (VHDs). |
Load metadata | Loads a metadata .cab file prior to importing a transportable shadow copy or loads the writer metadata in the case of a restore. If used without parameters, load metadata displays help at the command prompt. |
lodctr | Allows you to register or save performance counter name and registry settings in a file and designate trusted services. |
logman | Creates and manages Event Trace Session and Performance logs and supports many functions of Performance Monitor from the command line. |
logoff | Logs off a user from a session on a Remote Desktop Session Host server and deletes the session. |
lpq | Displays the status of a print queue on a computer running Line printer Daemon (LPD). |
lpr | Sends a file to a computer or printer-sharing device running the Line printer Daemon (LPD) service in preparation for printing. |
macfile | Manages File Server for Macintosh servers, volumes, directories, and files. You can automate administrative tasks by including a series of commands in batch files and starting them manually or at predetermined times. |
makecab | Package existing files into a cabinet (.cab) file. |
manage-bde | Turns on or turns off BitLocker, specifies unlock mechanisms, updates recovery methods, and unlocks BitLocker-protected data drives. |
mapadmin | The mapadmin command-line utility administers User Name Mapping on the local or remote computer running Microsoft Services for Network File System. If you are logged on with an account that does not have administrative credentials, you can specify a username and password for an account that does. |
md | Creates a directory or subdirectory. Command extensions, which are enabled by default, allow you to use a single md command to create intermediate directories in a specified path. |
Merge vdisk | Merges a differencing virtual hard disk (VHD) with its corresponding parent VHD. The parent VHD will be modified to include the modifications from the differencing VHD. This command modifies the parent VHD. As a result, other differencing VHDs that are dependent on the parent will no longer be valid. |
mkdir | Creates a directory or subdirectory. Command extensions, which are enabled by default, allow you to use a single mkdir command to create intermediate directories in a specified path. |
mklink | Creates a directory or file symbolic or hard link. |
mmc | Using mmc command-line options, you can open a specific mmc console, open mmc in author mode, or specify that the 32-bit or 64-bit version of mmc is opened. |
mode | Displays system status, changes system settings or reconfigures ports or devices. If used without parameters, mode displays all the controllable attributes of the console and the available COM devices. |
more | Displays one screen of output at a time. |
mount | A command-line utility that mounts Network File System (NFS) network shares. When used without options or arguments, mount displays information about all mounted NFS file systems. |
mountvol | Creates, deletes, or lists a volume mount point. You can also link volumes without requiring a drive letter. |
move | Creates, deletes, or lists a volume mount point. You can also link volumes without requiring a drive letter. |
mqbkup | Backs up MSMQ message files and registry settings to a storage device and restores previously-stored messages and settings.
Both the backup and the restore operations stop the local MSMQ service. If the MSMQ service was started beforehand, the utility will attempt to restart the MSMQ service at the end of the backup or the restore operation. If the service was already stopped before running the utility, no attempt to restart the service is made. Before using the MSMQ Message Backup/Restore utility you must close all local applications that are using MSMQ. |
mqsvc | Message Queuing technology enables apps running at different times to communicate across heterogeneous networks and systems that may be temporarily offline. Message Queuing provides guaranteed message delivery, efficient routing, security, and priority-based messaging. It can be used to implement solutions for both asynchronous and synchronous messaging scenarios. |
mqtgsvc | Monitors a queue for incoming messages and performs an action, in the form of an executable file or COM component, when the rules of a trigger are evaluated as true. |
msdt | Invokes a troubleshooting pack at the command line or as part of an automated script, and enables additional options without user input. |
msg | Sends a message to a user on a Remote Desktop Session Host server. |
msiexec | Provides the means to install, modify, and perform operations on Windows Installer from the command line. |
msinfo32 | Opens the System Information tool to display a comprehensive view of the hardware, system components, and software environment on the local computer. |
mstsc | Creates connections to Remote Desktop Session Host servers or other remote computers and edits an existing Remote Desktop Connection (.rdp) configuration file. |
nbtstat | Displays NetBIOS over TCP/IP (NetBT) protocol statistics, NetBIOS name tables for both the local computer and remote computers, and the NetBIOS name cache. This command also allows a refresh of the NetBIOS name cache and the names registered with Windows Internet Name Service (WINS). Used without parameters, this command displays Help information.
This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections. |
netcfg | Installs the Windows Preinstallation Environment (WinPE), a lightweight version of Windows used to deploy workstations. |
netdom | Enables administrators to manage Active Directory domains and trust relationships from the command prompt.
Netdom is a command-line tool that is built into Windows Server 2008 and Windows Server 2008 R2. It is available if you have the Active Directory Domain Services (AD DS) server role installed. It is also available if you install the Active Directory Domain Services Tools that are part of the Remote Server Administration Tools (RSAT). |
netprint | Displays information about a specified printer queue or a specified print job, or controls a specified print job. |
netsh | The Network Shell command-line scripting utility allows you to, either locally or remotely, display or modify the network configuration of a currently running computer. You can start this utility at the command prompt or in Windows PowerShell. |
netstat | Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters, this command displays active TCP connections. |
nfsadmin | A command-line utility that administers Server for NFS or Client for NFS on the local or remote computer running Microsoft Services for Network File System (NFS). Used without parameters, nfsadmin server displays the current Server for NFS configuration settings and nfsadmin client displays the current Client for NFS configuration settings. |
nfsshare | Controls Network File System (NFS) shares. Used without parameters, this command displays all Network File System (NFS) shares exported by Server for NFS. |
nfsstat | A command-line utility that displays statistical info about the Network File System (NFS) and Remote Procedure Call (RPC) calls. Used without parameters, this command displays all of the statistical data without resetting anything. |
nlbmgr | Configure and manage your Network Load Balancing clusters and all cluster hosts from a single computer, using the Network Load Balancing Manager. You can also use this command to replicate the cluster configuration to other hosts.
You can start the Network Load Balancing Manager from the command line using the command nlbmgr.exe, which is installed in the systemroot\System32 folder. |
nltest | Performs network administrative tasks. Nltest is a command-line tool that is built into Windows Server 2008 and Windows Server 2008 R2. It is available if you have the AD DS or the AD LDS server role installed. It is also available if you install the Active Directory Domain Services Tools that are part of the Remote Server Administration Tools (RSAT). |
nslookup | Displays information that you can use to diagnose Domain Name System (DNS) infrastructure. Before using this tool, you should be familiar with how DNS works. The nslookup command-line tool is available only if you have installed the TCP/IP protocol.
The nslookup command-line tool has two modes: interactive and noninteractive. If you need to look up only a single piece of data, we recommend using the non-interactive mode. For the first parameter, type the name or IP address of the computer that you want to look up. For the second parameter, type the name or IP address of a DNS name server. If you omit the second argument, nslookup uses the default DNS name server. If you need to look up more than one piece of data, you can use interactive mode. Type a hyphen (-) for the first parameter and the name or IP address of a DNS name server for the second parameter. If you omit both parameters, the tool uses the default DNS name server. While using the interactive mode, you can:
|
ntcmdprompt | Runs the command interpreter Cmd.exe, rather than Command.com, after running a Terminate and Stay Resident (TSR) or after starting the command prompt from within an MS-DOS application. |
ntfrsutl | Dumps the internal tables, thread, and memory information for the NT File Replication Service (NTFRS) from both the local and remote servers. The recovery setting for NTFRS in Service Control Manager (SCM) can be critical to locating and keeping important log events on the computer. This tool provides a convenient method of reviewing those settings. |
offline | Takes an online disk or volume to the offline state. |
online | Takes an offline disk or volume to the online state. |
openfiles | Enables an administrator to query, display, or disconnect files and directories that have been opened on a system. This command also enables or disables the system Maintain Objects List global flag. |
pagefileconfig | Enables an administrator to display and configure a system’s paging file Virtual Memory settings. |
path | Sets the command path in the PATH environment variable, specifying the set of directories used to search for executable (.exe) files. If used without parameters, this command displays the current command path. |
pathping | Provides information about network latency and network loss at intermediate hops between a source and destination. This command sends multiple echo Request messages to each router between a source and destination, over a period of time, and then computes results based on the packets returned from each router. Because this command displays the degree of packet loss at any given router or link, you can determine which routers or subnets might be having network problems. Used without parameters, this command displays help. |
pause | Suspends the processing of a batch program, displaying the prompt, Press any key to continue . . . |
pbadmin | Administers phone books. Used without parameters, pbadmin starts Phone Book Administrator |
perfmon | Start Windows Reliability and Performance Monitor in a specific standalone mode. |
ping | Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) echo Request messages. The receipt of corresponding echo Reply messages are displayed, along with round-trip times. ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution. Used without parameters, this command displays Help content.
You can also use this command to test both the computer name and the IP address of the computer. If pinging the IP address is successful, but pinging the computer name isn’t, you might have a name resolution problem. In this case, make sure the computer name you are specifying can be resolved through the local Hosts file, by using Domain Name System (DNS) queries, or through NetBIOS name resolution techniques. |
pktmon | Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) echo Request messages. The receipt of corresponding echo Reply messages are displayed, along with round-trip times. ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution. Used without parameters, this command displays Help content.
You can also use this command to test both the computer name and the IP address of the computer. If pinging the IP address is successful, but pinging the computer name isn’t, you might have a name resolution problem. In this case, make sure the computer name you are specifying can be resolved through the local Hosts file, by using Domain Name System (DNS) queries, or through NetBIOS name resolution techniques. |
pnpunattend | Audits a computer for device drivers, performs unattended driver installations, or searches for drivers without installing and, optionally, reports the results to the command line. Use this command to specify the installation of specific drivers for specific hardware devices. |
pnputil | Pnputil.exe is a command line utility that you can use to manage the driver store. You can use this command to add driver packages, remove driver packages, and list driver packages that are in the store. |
popd | The popd command changes the current directory to the directory that was most recently stored by the pushd command.
Every time you use the pushd command, a single directory is stored for your use. However, you can store multiple directories by using the pushd command multiple times. The directories are stored sequentially in a virtual stack, so if you use the pushd command once, the directory in which you use the command is placed at the bottom of the stack. If you use the command again, the second directory is placed on top of the first one. The process repeats every time you use the pushd command. If you use the popd command, the directory on the top of the stack is removed and the current directory is changed to that directory. If you use the popd command again, the next directory on the stack is removed. If command extensions are enabled, the popd command removes any drive-letter assignments created by the pushd command. |
powershell | Windows PowerShell is a task-based command-line shell and scripting language designed especially for system administration. Built on the .NET Framework, Windows PowerShell helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows. |
powershell_ise | Windows PowerShell Integrated Scripting Environment (ISE) is a graphical host application that enables you to read, write, run, debug, and test scripts and modules in a graphic-assisted environment. Key features such as IntelliSense, Show-Command, snippets, tab completion, syntax-coloring, visual debugging, and context-sensitive Help provide a rich scripting experience. |
Sends a text file to a printer. A file can print in the background if you send it to a printer connected to a serial or parallel port on the local computer. | |
prncnfg | Configures or displays configuration information about a printer. This command is a Visual Basic script located in the %WINdir%\System32\printing_Admin_Scripts\<language> directory. To use this command at a command prompt, type cscript followed by the full path to the prncnfg file, or change directories to the appropriate folder. For example: cscript %WINdir%\System32\printing_Admin_Scripts\en-US\prncnfg . |
prndrvr | Adds, deletes, and lists printer drivers. This command is a Visual Basic script located in the %WINdir%\System32\printing_Admin_Scripts\<language> directory. To use this command at a command prompt, type cscript followed by the full path to the prndrvr file, or change directories to the appropriate folder. For example: cscript %WINdir%\System32\printing_Admin_Scripts\en-US\prndrvr .
Used without parameters, prndrvr displays command-line help. |
prnjobs | Pauses, resumes, cancels, and lists print jobs. This command is a Visual Basic script located in the %WINdir%\System32\printing_Admin_Scripts\<language> directory. To use this command at a command prompt, type cscript followed by the full path to the prnjobs file, or change directories to the appropriate folder. For example: cscript %WINdir%\System32\printing_Admin_Scripts\en-US\prnjobs.vbs . |
prnmngr | Adds, deletes, and lists printers or printer connections, in addition to setting and displaying the default printer. This command is a Visual Basic script located in the %WINdir%\System32\printing_Admin_Scripts\<language> directory. To use this command at a command prompt, type cscript followed by the full path to the prnmngr file, or change directories to the appropriate folder. For example: cscript %WINdir%\System32\printing_Admin_Scripts\en-US\prnmngr . |
prnport | Creates, deletes, and lists standard TCP/IP printer ports, in addition to displaying and changing port configuration. This command is a Visual Basic script located in the %WINdir%\System32\printing_Admin_Scripts\<language> directory. To use this command at a command prompt, type cscript followed by the full path to the prnport file, or change directories to the appropriate folder. For example: cscript %WINdir%\System32\printing_Admin_Scripts\en-US\prnport . |
prnqctl | Prints a test page, pauses or resumes a printer, and clears a printer queue. This command is a Visual Basic script located in the %WINdir%\System32\printing_Admin_Scripts\<language> directory. To use this command at a command prompt, type cscript followed by the full path to the prnqctl file, or change directories to the appropriate folder. For example: cscript %WINdir%\System32\printing_Admin_Scripts\en-US\prnqctl . |
prompt | Changes the Cmd.exe command prompt, including displaying any text you want, such as the name of the current directory, the time and date, or the Microsoft Windows version number. If used without parameters, this command resets the command prompt to the default setting, which is the current drive letter and directory followed by the greater than symbol (>). |
pubprn | Publishes a printer to the Active Directory Domain Services. This command is a Visual Basic script located in the %WINdir%\System32\printing_Admin_Scripts\<language> directory. To use this command at a command prompt, type cscript followed by the full path to the pubprn file, or change directories to the appropriate folder. For example: cscript %WINdir%\System32\printing_Admin_Scripts\en-US\pubprn . |
pushd | Stores the current directory for use by the popd command, and then changes to the specified directory.
Every time you use the pushd command, a single directory is stored for your use. However, you can store multiple directories by using the pushd command multiple times. The directories are stored sequentially in a virtual stack, so if you use the pushd command once, the directory in which you use the command is placed at the bottom of the stack. If you use the command again, the second directory is placed on top of the first one. The process repeats every time you use the pushd command. If you use the popd command, the directory on the top of the stack is removed and the current directory is changed to that directory. If you use the popd command again, the next directory on the stack is removed. If command extensions are enabled, the popd command removes any drive-letter assignment created by the pushd command. |
pushprinterconnections | Reads Deployed Printer Connection settings from Group Policy and deploys or removes printer connections as needed. |
pwlauncher | Enables or disables the Windows To Go Startup Options (pwlauncher). The pwlauncher command-line tool allows you to configure the computer to boot into a Windows To Go workspace automatically (assuming one is present), without requiring you to enter your firmware or change your startup options.
Windows To Go Startup Options allow a user to configure their computer to boot from USB from within Windows-without ever entering their firmware, as long as their firmware supports booting from USB. Enabling a system to always boot from USB first has implications that you should consider. For example, a USB device that includes malware could be booted inadvertently to compromise the system, or multiple USB drives could be plugged in to cause a boot conflict. For this reason, the default configuration has the Windows To Go Startup Options disabled by default. In addition, administrator privileges are required to configure Windows To Go Startup Options. If you enable the Windows To Go startup options using the pwlauncher command-line tool or the Change Windows To Go Startup Options app the computer will attempt to boot from any USB device that is inserted into the computer before it is started. |
about_Pwsh | Explains how to use the pwsh command-line interface. Displays the command-line parameters and describes the syntax. |
qappsrv | Displays a list of all Remote Desktop Session Host servers on the network. |
qprocess | Displays information about processes that are running on a Remote Desktop Session Host server. |
Query commands | Displays information about processes, sessions, and Remote Desktop Session Host servers. |
quser | Displays information about user sessions on a Remote Desktop Session Host server. You can use this command to find out if a specific user is logged on to a specific Remote Desktop Session Host server. This command returns the following information:
|
qwinsta | Displays information about sessions on a Remote Desktop Session Host server. The list includes information not only about active sessions but also about other sessions that the server runs. |
Rd or rmdir | Deletes a directory. |
rdpsign | Enables you to digitally sign a Remote Desktop Protocol (.rdp) file. |
recover | Recovers readable information from a bad or defective disk. This command reads a file, sector-by-sector, and recovers data from the good sectors. Data in bad sectors is lost. Because all data in bad sectors is lost when you recover a file, you should recover only one file at a time.
Bad sectors reported by the chkdsk command were marked as bad when your disk was prepared for operation. They pose no danger, and recovery does not affect them. |
Recover (Diskpart) | Refreshes the state of all disks in a disk group, attempts to recover disks in an invalid disk group, and resynchronizes mirrored volumes and RAID-5 volumes that have stale data. This command operates on disks that are failing or already failed. It also operates on volumes that are failed, failing, or in failed redundancy state.
This command operates on groups of dynamic disks. If this command is used on a group with a basic disk, it won’t return an error, but no action will be taken. |
ReFSUtil | ReFSUtil is a tool included in Windows and Windows Server that attempts to diagnose heavily damaged ReFS volumes, identify remaining files, and copy those files to another volume. This tool comes in the %SystemRoot%\Windows\System32 folder.
ReFS salvage is the primary function of ReFSUtil, and is useful for recovering data from volumes that show as RAW in Disk Management. ReFS Salvage has two phases: Scan Phase and a Copy Phase. In automatic mode, the Scan Phase and Copy Phase will run sequentially. In manual mode, each phase can be run separately. Progress and logs are saved in a working directory to allow phases to be run separately as well as Scan Phase to be paused and resumed. You shouldn’t need to use the ReFSutil tool unless the volume is RAW. If read-only, then data is still accessible. |
Reg commands | Performs operations on registry subkey information and values in registry entries.
Some operations enable you to view or configure registry entries on local or remote computers, while others allow you to configure only local computers. Using reg to configure the registry of remote computers limits the parameters that you can use in some operations. Check the syntax and parameters for each operation to verify that they can be used on remote computers. |
regini | Modifies the registry from the command line or a script, and applies changes that were preset in one or more text files. You can create, modify, or delete registry keys, in addition to modifying the permissions on the registry keys. |
regsvr32 | Registers .dll files as command components in the registry. |
relog | Extracts 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. |
rem | Records comments in a script, batch, or config.sys file. If no comment is specified, rem adds vertical spacing. |
remove | Removes a drive letter or mount point from the volume with focus. If all parameter is used, all current drive letters and mount points are removed. If no drive letter or mount point is specified, then DiskPart removes the first drive letter or mount point it encounters.
The remove command can also be used to change the drive letter associated with a removable drive. You can’t remove the drive letters on the system, boot, or paging volumes. In addition, you can’t remove the drive letter for an OEM partition, any GPT partition with an unrecognized GUID, or any of the special, non-data, GPT partitions such as the EFI system partition. |
Rename or ren | Renames files or directories. |
repadmin | Repadmin.exe helps administrators diagnose Active Directory replication problems between domain controllers running Microsoft Windows operating systems. |
repair | Repairs the RAID-5 volume with focus by replacing the failed disk region with the specified dynamic disk.
A volume in a RAID-5 array must be selected for this operation to succeed. Use the select volume command to select a volume and shift the focus to it. |
replace | Replace existing files in a directory. If used with the /a option, this command adds new files to a directory instead of replacing existing files. |
rescan | Using the diskpart command interpreter, you can locate new disks added to your computer. |
reset | Resets DiskShadow.exe to the default state. This command is especially useful in separating compound DiskShadow operations, such as create, import, backup, or restore. |
retain | Prepares an existing simple dynamic volume for use as a boot or system volume. If you use a master boot record (MBR) dynamic disk, this command creates a partition entry in the master boot record. If you use a GUID partition table (GPT) dynamic disk, this command creates a partition entry in the GUID partition table. |
revert | Reverts a volume back to a specified shadow copy. This is supported only for shadow copies in the CLIENTACCESSIBLE context. These shadow copies are persistent and can only be made by the system provider. If used without parameters, revert displays help at the command prompt. |
robocopy | Copies file data from one location to another. |
route | Displays and modifies the entries in the local IP routing table. If used without parameters, route displays help at the command prompt. |
rpcinfo | Lists programs on remote computers. The rpcinfo command-line utility makes a remote procedure call (RPC) to an RPC server and reports what it finds. |
rpcping | Confirms the RPC connectivity between the computer running Microsoft Exchange Server and any of the supported Microsoft Exchange Client workstations on the network. This utility can be used to check if the Microsoft Exchange Server services are responding to RPC requests from the client workstations via the network. |
rundll32 | Loads and runs 32-bit dynamic-link libraries (DLLs). There are no configurable settings for Rundll32. Help information is provided for a specific DLL you run with the rundll32 command.
You must run the rundll32 command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator. |
rundll32 printui.dll,PrintUIEntry | Automates many printer configuration tasks. printui.dll is the executable file that contains the functions used by the printer configuration dialog boxes. These functions can also be called from within a script or a command-line batch file, or they can be run interactively from the command prompt. |
san | Displays or sets the storage area network (san) policy for the operating system. If used without parameters, the current san policy is displayed. |
Sc.exe config | Displays or sets the storage area network (san) policy for the operating system. If used without parameters, the current san policy is displayed. |
Sc.exe create | Creates a subkey and entries for service in the registry and in the Service Control Manager database. |
Sc.exe delete | Deletes a service subkey from the registry. If the service is running or if another process has an open handle to the service, the service is marked for deletion. |
Sc.exe query | Obtains and displays information about the specified service, driver, type of service, or type of driver. |
Schtasks commands | Schedules commands and programs to run periodically or at a specific time adds and removes tasks from the schedule, starts and stops tasks on demand, and displays and changes scheduled tasks. |
scwcmd | The Scwcmd.exe command-line tool included with the Security Configuration Wizard (SCW) can be used to perform the following tasks:
|
Secedit commands | Configures and analyzes system security by comparing your current security configuration against specified security templates. |
Select commands | Shifts the focus to a disk, partition, volume, or virtual hard disk (VHD). |
serverceipoptin | Allows you to participate in the Customer Experience Improvement Program (CEIP). |
serverweroptin | Allows you to turn on error reporting. |
Set (environment variable) | Displays, sets, or removes cmd.exe environment variables. If used without parameters, set displays the current environment variable settings. |
Set commands | Sets the context, options, verbose mode, and metadata file for shadow copy creation. If used without parameters, set lists all current settings. |
setx | Creates or modifies environment variables in the user or system environment, without requiring programming or scripting. The Setx command also retrieves the values of registry keys and writes them to text files. |
sfc | Scans and verifies the integrity of all protected system files and replaces incorrect versions with correct versions. If this command discovers that a protected file has been overwritten, it retrieves the correct version of the file from the systemroot\ folder, and then replaces the incorrect file. |
shadow | Enables you to remotely control an active session of another user on a Remote Desktop Session Host server. |
shift | Changes the position of batch parameters in a batch file. |
showmount | You can use showmount to display information about mounted file systems exported by Server for NFS on a specified computer. If you don’t specify a server, this command displays information about the computer on which the showmount command is run. |
shrink | The Diskpart shrink command reduces the size of the selected volume by the amount you specify. This command makes free disk space available from the unused space at the end of the volume.
A volume must be selected for this operation to succeed. Use the select volume command to select a volume and shift the focus to it. |
shutdown | Enables you to shut down or restart local or remote computers, one at a time. |
Simulate restore | Tests whether writer involvement in restore sessions will be successful on the computer without issuing PreRestore or PostRestore events to writers. |
sort | Reads input sorts data, and writes the results to the screen, to a file, or to another device. |
start | Starts a separate Command Prompt window to run a specified program or command. |
Wdsutil set-device | Changes the attributes of a pre-staged computer. A pre-staged computer is a computer that has been linked to a computer account object in active directory Domain Servers (AD DS). Prestaged clients are also called known computers. You can configure properties on the computer account to control the installation for the client. For example, you can configure the network boot program and the unattended file that the client should receive, as well as the server from which the client should download the network boot program. |
Subcommand: set-DriverGroup | Sets the properties of an existing driver group on a server. |
Subcommand: set-DriverGroupfilter | Adds or removes an existing driver group filter from a driver group. |
Subcommand: set-DriverPackage | Renames and/or enables or disables a driver package on a server. |
wdsutil set-image | Changes the attributes of an image. |
wdsutil set-imagegroup | Changes the attributes of an image group. |
wdsutil set-server | Configures the settings for a Windows Deployment Services server. |
wdsutil set-transportserver | Sets configuration settings for a Transport Server. |
wdsutil start-multicasttransmission | Starts a Scheduled-Cast transmission of an image. |
wdsutil start-server | Starts all services for a Windows Deployment Services server. |
wdsutil start-namespace | Starts a Scheduled-Cast namespace. |
wdsutil stop-server | Stops all services on a Windows Deployment Services server. |
wdsutil stop-transportserver | Stops all services on a Transport Server. |
subst | Associates a path with a drive letter. If used without parameters, subst displays the names of the virtual drives in effect. |
sxstrace | Diagnoses side-by-side problems. |
systeminfo | Displays detailed configuration information about a computer and its operating system, including operating system configuration, security information, product ID, and hardware properties (such as RAM, disk space, and network cards). |
takeown | Enables an administrator to recover access to a file that previously was denied, by making the administrator the owner of the file. This command is typically used on batch files. |
tapicfg | Creates, removes, or displays a TAPI application directory partition, or sets a default TAPI application directory partition. TAPI 3.1 clients can use the information in this application directory partition with the directory service locator service to find and communicate with TAPI directories. You can also use tapicfg to create or remove service connection points, which enable TAPI clients to efficiently locate TAPI application directory partitions in a domain.
This command-line tool can be run on any computer that is a member of the domain. |
taskkill | Ends one or more tasks or processes. Processes can be ended by process ID or image name. You can use the tasklist command to determine the process ID (PID) for the process to be ended. |
tasklist | Displays a list of currently running processes on the local computer or on a remote computer. Tasklist replaces the tlist tool. |
tcmsetup | Sets up or disables the TAPI client. For TAPI to function correctly, you must run this command to specify the remote servers that will be used by TAPI clients. |
telnet | Communicates with a computer running the telnet server service. Running this command without any parameters, lets you enter the telnet context, as indicated by the telnet prompt (Microsoft telnet>). From the telnet prompt, you can use telnet commands to manage the computer running the telnet client. |
tftp | Transfers files to and from a remote computer, typically a computer running UNIX, that is running the Trivial File Transfer Protocol (tftp) service or daemon. tftp is typically used by embedded devices or systems that retrieve firmware, configuration information, or a system image during the boot process from a tftp server. |
time | Displays or sets the system time. If used without parameters, time displays the current system time and prompts you to enter a new time. |
timeout | Pauses the command processor for the specified number of seconds. This command is typically used in batch files. |
title | Creates a title for the Command Prompt window. |
tlntadmn | Administers a local or remote computer that is running the telnet Server Service. If used without parameters, tlntadmn displays the current server settings.
This command requires you to log on to the local computer with administrative credentials. To administer a remote computer, you must also provide administrative credentials for the remote computer. You can do so by logging on to the local computer with an account that has administrative credentials for both the local computer and the remote computer. If you can’t use this method, you can use the -u and -p parameters to provide administrative credentials for the remote computer. |
tpmtool | This utility can be used to get information about the Trusted Platform Module (TPM) |
tpmvscmgr | The tpmvscmgr command-line tool allows users with Administrative credentials to create and delete TPM virtual smart cards on a computer. |
tracerpt | The tracerpt command parses Event Trace Logs, log files generated by Performance Monitor, and real-time Event Trace providers. It also generates dump files, report files, and report schemas. |
tracert | This diagnostic tool determines the path taken to a destination by sending Internet Control Message Protocol (ICMP) echo Request or ICMPv6 messages to the destination with incrementally increasing time to live (TTL) field values. Each router along the path is required to decrement the TTL in an IP packet by at least 1 before forwarding it. Effectively, the TTL is a maximum link counter. When the TTL on a packet reaches 0, the router is expected to return an ICMP Time Exceeded message to the source computer.
This command determines the path by sending the first echo Request message with a TTL of 1 and incrementing the TTL by 1 on each subsequent transmission until the target responds or the maximum number of hops is reached. The maximum number of hops is 30 by default and can be specified using the /h parameter. The path is determined by examining the ICMP Time Exceeded messages returned by intermediate routers and the echo Reply message returned by the destination. However, some routers do not return time Exceeded messages for packets with expired TTL values and are invisible to the tracert command. In this case, a row of asterisks (*) is displayed for that hop. The path displayed is the list of near/side router interfaces of the routers in the path between a source host and a destination. The near/side interface is the interface of the router that is closest to the sending host in the path. |
tree | Displays the directory structure of a path or of the disk in a drive graphically. The structure displayed by this command depends upon the parameters that you specify at the command prompt. If you don’t specify a drive or path, this command displays the tree structure beginning with the current directory of the current drive. |
tscon | Connects to another session on a Remote Desktop Session Host server. |
tsdiscon | Disconnects a session from a Remote Desktop Session Host server. If you don’t specify a session ID or session name, this command disconnects the current session. |
tsecimp | Imports assignment information from an Extensible Markup Language (XML) file into the TAPI server security file (Tsec.ini). You can also use this command to display the list of TAPI providers and the lines devices associated with each of them, validate the structure of the XML file without importing the contents, and check domain membership. |
tskill | Ends a process running in a session on a Remote Desktop Session Host server. |
tsprof | Copies the Remote Desktop Services user configuration information from one user to another. The Remote Desktop Services user configuration information appears in the Remote Desktop Services extensions to Local Users and Groups and active directory Users and computers. |
type | In the Windows Command shell, type is a built-in command which displays the contents of a text file. Use the type command to view a text file without modifying it.
In PowerShell, type is a built-in alias to the Get-Content cmdlet, which also displays the contents of a file, but using a different syntax. |
typeperf | The typeperf command writes performance data to the command window or to a log file. To stop typeperf, press CTRL+C. |
tzutil | Displays the Windows Time Zone utility. |
unexpose | Unexposes a shadow copy that was exposed by using the expose command. The exposed shadow copy can be specified by its Shadow ID, drive letter, share, or mount point. |
uniqueid | Displays or sets the GUID partition table (GPT) identifier or master boot record (MBR) signature for the basic or dynamic disk with focus. A basic or dynamic disk must be selected for this operation to succeed. Use the select disk command to select a disk and shift the focus to it. |
unlodctr | Removes Performance counter names and Explain text for a service or device driver from the system registry. |
ver | Displays the operating system version number. This command is supported in the Windows Command prompt (Cmd.exe), but not in any version of PowerShell. |
verifier | Driver Verifier monitors Windows kernel-mode drivers and graphics drivers to detect illegal function calls or actions that might corrupt the system. Driver Verifier can subject Windows drivers to a variety of stresses and tests to find improper behavior. You can configure which tests to run, which allows you to put a driver through heavy stress loads or through more streamlined testing. You can also run Driver Verifier on multiple drivers simultaneously, or on one driver at a time. |
verify | Tells the Command Prompt tool (cmd.exe) whether to verify your files are written correctly to a disk. |
vol | Displays the disk volume label and serial number, if they exist. If used without parameters, vol displays information for the current drive. |
vssadmin | Displays current volume shadow copy backups and all installed shadow copy writers and providers. |
waitfor | Sends or waits for a signal on a system. This command is used to synchronize computers across a network. |
wbadmin | Enables you to back up and restore your operating system, volumes, files, folders, and applications from a command prompt.
To configure a regularly scheduled backup using this command, you must be a member of the Administrators group. To perform all other tasks with this command, you must be a member of the Backup Operators group or the Administrators group, or you must have been delegated the appropriate permissions. You must run wbadmin from an elevated command prompt, by right-clicking Command Prompt, and then select Run as administrator. |
wdsutil | Wdsutil is a command-line utility used for managing your Windows Deployment Services server. To run these commands, click Start, right-click Command prompt, and click Run as administrator. |
wecutil | Enables you to create and manage subscriptions to events that are forwarded from remote computers. The remote computer must support the WS-Management protocol. |
wevtutil | Enables you to retrieve information about event logs and publishers. You can also use this command to install and uninstall event manifests, run queries, and export, archive, and clear logs. |
where | Displays the location of files that match the given search pattern. |
whoami | Displays user, group, and privileges information for the user who is currently logged on to the local system. If used without parameters, whoami displays the current domain and user name. |
winnt32 | Performs an installation of or upgrade to a product in Windows Server 2003. You can run winnt32 at the command prompt on a computer running Windows 95, Windows 98, Windows Millennium Edition, Windows NT, Windows 2000, Windows XP, or a product in the Windows Server 2003. If you run winnt32 on a computer running Windows NT version 4.0, you must first apply Service Pack 5 or later. |
winrs | Windows remote Management allows you to manage and execute programs remotely. |
Winstat mem | Tests system memory bandwidth in a manner reflective of large memory to memory buffer copies, as are used in multimedia processing. |
Winsat mfmedia | Measures the performance of video decoding (playback) using the Media Foundation framework. |
wmic | Displays WMI information inside an interactive command shell. |
writer | Verifies that a writer or component is included or excluded a writer or component from the backup or restore procedure. If used without parameters, writer displays help at the command prompt. |
wscript | Windows 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. |
xcopy | Copies files and directories, including subdirectories. |
Read: How to open Command Prompt in a folder in Windows
How do I get a list of commands in Command Prompt?
To get a list of commands that are useful to you in Command Prompt, open Command Prompt as an administrator and type help, and press Enter. You will see a list of commands you can use on your PC to do various tasks easily using the Command-line tools.
How many Command Prompt commands are there?
There are more than 300 Command Prompt commands with many more subcommands. The list is too big to count. The above list is a compilation of 293 commands that you can use on various Windows environments to carry out different tasks. Whether you use Windows 11 or Windows 10, you can use all of these commands in the standalone Command Prompt or Windows Terminal.
Related read: Command Prompt won’t run as Administrator in Windows.