Introduction to Windows Commands
All versions of Windows and Windows Server come with a built-in set of Win32 console commands. These commands help users automate various tasks using scripts or scripting tools, making system management more efficient.
Command-Line Shells in Windows
Windows provides two primary command-line environments: the Command Prompt (CMD) and PowerShell. Both serve as interfaces for executing commands and automating tasks, but they differ in capabilities and functionality.
1. Command Prompt (CMD)
CMD was the original command-line shell in Windows, primarily used for automating tasks such as user account management and backups through batch scripts (.bat files). The Windows Script Host further extended CMD’s capabilities by allowing more advanced scripting using cscript or wscript.
Although CMD remains useful, it is less powerful than PowerShell in terms of automation and scripting capabilities.
2. PowerShell
PowerShell was developed to provide a more advanced scripting environment than CMD. It introduces cmdlets—specialized commands that enhance automation and system management. Unlike CMD, PowerShell can execute both traditional Windows commands and cmdlets, making it the preferred choice for modern Windows automation.
For the most up-to-date and efficient Windows scripting, PowerShell is recommended over CMD or Windows Script Host.
Exit Codes and Error Handling in Windows Commands
Windows commands generate exit and error codes, which can help diagnose issues when a command fails. A detailed list of these system error codes is available in Windows documentation.
Command Redirection Operators
Windows supports command redirection operators, allowing users to redirect command output to files or other commands. Understanding these operators enhances efficiency when working with Windows commands.
Automatic File and Directory Name Completion in CMD
CMD offers an automatic file and directory name completion feature, which speeds up command execution. This feature is triggered using control characters (default: the Tab key). Users can modify these control characters by editing registry values:
- For all users:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\PathCompletionChar
These registry values are of type REG_DWORD and can be set using hexadecimal or decimal values. If you wish to disable a completion character, use the space key value (0x20).
Alternatively, file and directory name completion can be enabled or disabled per session by launching CMD with the following parameters:
- Enable name completion:
cmd.exe /F:ON
- Disable name completion:
cmd.exe /F:OFF
When enabled, the default shortcuts are:
- Ctrl + D → Directory name completion
- Ctrl + F → File name completion
User-specific settings override system-wide settings, and command-line parameters take precedence over registry configurations.
Finding Windows Commands by Name
Windows provides a vast set of commands for different operations. To find details about a specific command, navigate through the A-Z command reference and select the corresponding command name.
Windows Commands (A) with Syntax
1. active
Marks the selected partition as active, allowing it to be used as the system partition.
Syntax:
active
2. add
Adds a new entry to a list or configuration setting. Used in various contexts like firewall rules and policies.
Syntax:
add [options]
3. add alias
Creates an alias for a command in the Windows environment.
Syntax:
add alias <alias_name> <command>
4. add volume
Adds a volume to the system for storage management.
Syntax:
add volume <volume_name>
5. adprep
Prepares an existing Active Directory environment for an upgrade to a newer version of Windows Server.
Syntax:
adprep /forestprep
adprep /domainprep
adprep /rodcprep
6. append
Enables programs to open files in a specified directory as if they were in the current directory.
Syntax:
append [drive:]path[;...]
7. arp (Address Resolution Protocol)
Displays and modifies the IP-to-MAC address translation table.
Syntax:
arp -a # Displays the current ARP table
arp -d <IP> # Deletes an entry
arp -s <IP> <MAC> # Manually adds an entry
8. assign
Assigns a drive letter to a volume.
Syntax:
assign [letter=<drive_letter>]
9. assoc
Displays or modifies file associations (which program opens a file type).
Syntax:
assoc # Lists all file associations
assoc .txt=Notepad.Document # Changes .txt file association
10. at
Schedules a command to run at a specified time (deprecated, use schtasks
).
Syntax:
at <time> <command>
11. atmadm
Displays ATM (Asynchronous Transfer Mode) call information.
Syntax:
atmadm -c
12. attach-vdisk
Attaches a virtual hard disk (VHD).
Syntax:
attach vdisk [readonly]
13. attrib
Changes file and folder attributes like read-only, hidden, or system.
Syntax:
attrib +r|-r +h|-h +s|-s <filename>
14. attributes
Manages disk or volume attributes.
Syntax:
attributes <disk|volume> [options]
15. attributes disk
Modifies disk attributes like read-only or offline.
Syntax:
attributes disk set readonly
attributes disk clear readonly
16. attributes volume
Modifies volume attributes.
Syntax:
attributes volume set readonly
attributes volume clear readonly
17. auditpol
Manages auditing policies on a local or remote system.
Syntax:
auditpol /get /category:*
18. auditpol backup
Backs up the current audit policy settings.
Syntax:
auditpol /backup /file:<filename>
19. auditpol clear
Clears all current audit policy settings.
Syntax:
auditpol /clear
20. auditpol get
Retrieves and displays the current audit policy settings.
Syntax:
auditpol /get /subcategory:"Logon/Logoff"
21. auditpol list
Lists all audit policy settings.
Syntax:
auditpol /list /subcategory
22. auditpol remove
Removes specific audit policies.
Syntax:
auditpol /remove /subcategory:"Privilege Use"
23. auditpol resourcesacl
Manages security auditing policies for resource access.
Syntax:
auditpol /resourceSACL /set /type:File
24. auditpol restore
Restores audit policy settings from a backup file.
Syntax:
auditpol /restore /file:<filename>
25. auditpol set
Sets a new audit policy.
Syntax:
auditpol /set /subcategory:"Account Logon" /success:enable
26. autochk
Runs chkdsk
automatically on startup if a disk error is detected.
Syntax:
autochk /?
27. autoconv
Converts FAT volumes to NTFS during system startup.
Syntax:
autoconv <drive> /?
28. autofmt
Formats a partition automatically when needed.
Syntax:
autofmt <drive> /?
29. automount
Manages automatic mounting of file systems.
Syntax:
automount enable
automount disable
Windows Commands (B) with Syntax
1. bcdboot
Used to create or repair the system partition’s boot files.
Syntax:
bcdboot <source> [/s <volume>] [/f <firmware>] [/c] [/l <locale>]
2. bcdedit
Edits the Boot Configuration Data (BCD) store.
Syntax:
bcdedit /set {bootmgr} displaybootmenu yes
3. bdehdcfg
Configures hard drives for BitLocker Drive Encryption.
Syntax:
bdehdcfg -target <drive>
4. bdehdcfg driveinfo
Displays drive information related to BitLocker.
Syntax:
bdehdcfg -driveinfo <drive>
5. bdehdcfg newdriveletter
Assigns a new drive letter.
Syntax:
bdehdcfg -newdriveletter <letter>
6. bdehdcfg quiet
Suppresses output messages.
Syntax:
bdehdcfg -quiet
7. bdehdcfg restart
Restarts the system after configuration.
Syntax:
bdehdcfg -restart
8. bdehdcfg size
Specifies the partition size for BitLocker.
Syntax:
bdehdcfg -size <size_in_MB>
9. bdehdcfg target
Defines the target drive for BitLocker configuration.
Syntax:
bdehdcfg -target <drive>
10. begin backup
Initiates a backup process.
Syntax:
begin backup
11. begin restore
Initiates a restore process.
Syntax:
begin restore
12. bitsadmin
Manages Background Intelligent Transfer Service (BITS) jobs.
Syntax:
bitsadmin <command> <options>
13. bitsadmin addfile
Adds a file to a BITS transfer job.
Syntax:
bitsadmin /addfile <job> <remote_url> <local_path>
14. bitsadmin addfileset
Adds multiple files to a job.
Syntax:
bitsadmin /addfileset <job> <fileset.txt>
15. bitsadmin addfilewithranges
Adds a file specifying byte ranges.
Syntax:
bitsadmin /addfilewithranges <job> <remote_url> <local_path> <byte_ranges>
16. bitsadmin cache
Manages the BITS cache.
Syntax:
bitsadmin /cache <option>
17. bitsadmin cache and delete
Deletes cached BITS data.
Syntax:
bitsadmin /cache /delete
18. bitsadmin cache and deleteurl
Deletes a specific URL from the cache.
Syntax:
bitsadmin /cache /deleteurl <URL>
19. bitsadmin cache and getexpirationtime
Gets cache expiration time.
Syntax:
bitsadmin /cache /getexpirationtime
20. bitsadmin cache and getlimit
Gets the current cache size limit.
Syntax:
bitsadmin /cache /getlimit
21. bitsadmin cache and help
Displays help for cache commands.
Syntax:
bitsadmin /cache /help
22. bitsadmin cache and info
Shows cache information.
Syntax:
bitsadmin /cache /info
23. bitsadmin cache and list
Lists cache contents.
Syntax:
bitsadmin /cache /list
24. bitsadmin cache and setexpirationtime
Sets cache expiration time.
Syntax:
bitsadmin /cache /setexpirationtime <time>
25. bitsadmin cache and setlimit
Sets cache size limit.
Syntax:
bitsadmin /cache /setlimit <size_in_MB>
26. bitsadmin cache and clear
Clears all cache data.
Syntax:
bitsadmin /cache /clear
27. bitsadmin cancel
Cancels a BITS job.
Syntax:
bitsadmin /cancel <job_name>
28. bitsadmin complete
Completes a job and commits the files.
Syntax:
bitsadmin /complete <job_name>
29. bitsadmin create
Creates a new BITS job.
Syntax:
bitsadmin /create <job_name>
30. bitsadmin examples
Displays command examples.
Syntax:
bitsadmin /examples
31. bitsadmin getaclflags
Gets ACL flags for a job.
Syntax:
bitsadmin /getaclflags <job_name>
32. bitsadmin getbytestotal
Gets total bytes for a job.
Syntax:
bitsadmin /getbytestotal <job_name>
33. bitsadmin getbytestransferred
Shows transferred bytes.
Syntax:
bitsadmin /getbytestransferred <job_name>
34. bitsadmin getclientcertificate
Gets the client certificate used in a job.
Syntax:
bitsadmin /getclientcertificate <job_name>
35. bitsadmin getcompletiontime
Gets job completion time.
Syntax:
bitsadmin /getcompletiontime <job_name>
36. bitsadmin getcreationtime
Gets job creation time.
Syntax:
bitsadmin /getcreationtime <job_name>
37. bitsadmin getcustomheaders
Displays custom headers for a job.
Syntax:
bitsadmin /getcustomheaders <job_name>
38. bitsadmin getdescription
Gets job description.
Syntax:
bitsadmin /getdescription <job_name>
39. bitsadmin getdisplayname
Gets job display name.
Syntax:
bitsadmin /getdisplayname <job_name>
40. bitsadmin geterror
Gets last error in a job.
Syntax:
bitsadmin /geterror <job_name>
41. bitsadmin geterrorcount
Displays error count.
Syntax:
bitsadmin /geterrorcount <job_name>
42. bootcfg
Modifies the boot configuration.
Syntax:
bootcfg <option>
43. bootcfg addsw
Adds a switch to the boot configuration.
Syntax:
bootcfg /addsw /id <ID> /sw <switch>
44. bootcfg copy
Copies a boot entry.
Syntax:
bootcfg /copy /id <ID>
45. bootcfg dbg1394
Enables 1394 debugging.
Syntax:
bootcfg /dbg1394 /id <ID>
46. bootcfg debug
Enables debugging mode.
Syntax:
bootcfg /debug /id <ID>
47. bootcfg default
Sets the default boot entry.
Syntax:
bootcfg /default /id <ID>
48. bootcfg delete
Deletes a boot entry.
Syntax:
bootcfg /delete /id <ID>
49. bootcfg ems
Enables Emergency Management Services (EMS).
Syntax:
bootcfg /ems /id <ID>
50. bootcfg query
Displays the current boot settings.
Syntax:
bootcfg /query
51. bootcfg raw
Edits raw boot settings.
Syntax:
bootcfg /raw /id <ID>
52. bootcfg rmsw
Removes a switch from a boot entry.
Syntax:
bootcfg /rmsw /id <ID>
53. bootcfg timeout
Sets the boot menu timeout.
Syntax:
bootcfg /timeout <seconds>
54. break
Used to enable or disable CTRL+C handling.
Syntax:
break [on|off]
Windows Commands (C) with Syntax
cacls – Displays or modifies access control lists (ACLs) of files.
Syntax: cacls filename [/t] [/e] [/c] [/g user:perm] [/r user] [/p user:perm]
call – Calls another batch script from within a script.
Syntax: call filename [arguments]
cd – Displays or changes the current directory.
Syntax: cd [drive:][path]
certreq – Requests, retrieves, accepts, or denies a certificate from a certificate authority.
Syntax: certreq -new request.inf request.req
certutil – Manages certificates, key pairs, and certificate stores.
Syntax: certutil [options]
change – Modifies terminal server settings.
Syntax: change logon /enable | /disable | /query
change logon – Enables or disables logons from Terminal Services.
Syntax: change logon [/enable | /disable | /query]
change port – Lists or changes COM port mappings for Terminal Services.
Syntax: change port COMx=COMy
change user – Changes user session mode for applications.
Syntax: change user /install | /execute | /query
chcp – Displays or sets the active code page number.
Syntax: chcp [nnn]
chdir – Alias for cd
, used to change the directory.
Syntax: chdir [drive:][path]
chglogon – Similar to change logon
, enables or disables logons.
Syntax: chglogon /enable | /disable | /query
chgport – Similar to change port
, modifies COM port mappings.
Syntax: chgport COMx=COMy
chgusr – Similar to change user
, modifies application installation mode.
Syntax: chgusr /install | /execute | /query
chkdsk – Checks a disk for errors and attempts to fix them.
Syntax: chkdsk [drive:] [/f] [/r] [/x]
chkntfs – Displays or modifies the automatic checking of disks at startup.
Syntax: chkntfs [drive:] /c | /x | /t:time
choice – Prompts the user to make a selection from a list of choices.
Syntax: choice /c [choices] /n /m [message]
cipher – Displays or alters file encryption status.
Syntax: cipher [/e | /d] [/s:dir]
clean – Removes all partitions from a disk.
Syntax: clean
(Used inside Diskpart)
cleanmgr – Cleans unnecessary files from the disk.
Syntax: cleanmgr [/sageset:n | /sagerun:n]
clip – Copies output to the clipboard.
Syntax: command | clip
cls – Clears the command prompt screen.
Syntax: cls
cmd – Opens a new command prompt window.
Syntax: cmd [/c command | /k command]
cmdkey – Creates, lists, or deletes stored credentials.
Syntax: cmdkey /list | /add:targetname /user:username /pass:password
cmstp – Installs or removes a Connection Manager profile.
Syntax: cmstp [options]
color – Sets the text and background color of the command prompt.
Syntax: color [attr]
comp – Compares two files byte by byte.
Syntax: comp file1 file2
compact – Displays or modifies NTFS file compression.
Syntax: compact [/c | /u] [/s:dir]
compact vdisk – Reduces the physical size of a virtual disk.
Syntax: compact vdisk
(Used in Diskpart)
convert – Converts a file system or disk format.
Syntax: convert drive: /fs:ntfs
convert basic – Converts a dynamic disk back to basic.
Syntax: convert basic
(Used in Diskpart)
convert dynamic – Converts a basic disk to a dynamic disk.
Syntax: convert dynamic
(Used in Diskpart)
convert gpt – Converts a disk to GPT partition style.
Syntax: convert gpt
(Used in Diskpart)
convert mbr – Converts a disk to MBR partition style.
Syntax: convert mbr
(Used in Diskpart)
copy – Copies files from one location to another.
Syntax: copy source destination
create – Used to create partitions or volumes in Diskpart.
Syntax: create partition primary
create partition efi – Creates an EFI system partition.
Syntax: create partition efi size=n
create partition extended – Creates an extended partition.
Syntax: create partition extended size=n
create partition logical – Creates a logical partition within an extended partition.
Syntax: create partition logical size=n
create partition msr – Creates a Microsoft Reserved (MSR) partition.
Syntax: create partition msr size=n
create partition primary – Creates a primary partition.
Syntax: create partition primary size=n
create volume mirror – Creates a mirrored volume.
Syntax: create volume mirror disk=n
create volume raid – Creates a RAID-5 volume.
Syntax: create volume raid disk=n,n,n
create volume simple – Creates a simple volume.
Syntax: create volume simple size=n disk=n
create volume stripe – Creates a striped volume.
Syntax: create volume stripe size=n disk=n,n
cscript – Runs VBScript and JScript scripts.
Syntax: cscript scriptname.vbs [options]
Windows Commands (D) with Syntax
date – Displays or sets the system date.
Syntax: date [/T | new_date]
dcdiag – Analyzes the state of domain controllers in a forest or enterprise.
Syntax: dcdiag /test:[TestName]
dcgpofix – Restores the default Group Policy objects.
Syntax: dcgpofix [/target:Domain | DC | Both]
dcpromo – Promotes a server to a domain controller or demotes it.
Syntax: dcpromo /unattend:filename
defrag – Defragments a disk.
Syntax: defrag [drive:] [/C] [/X] [/H]
del – Deletes one or more files.
Syntax: del [drive:][path]filename [/F] [/S] [/Q]
delete – Used in Diskpart to remove a partition, volume, or disk.
Syntax: delete partition | volume | disk
delete disk – Deletes a specified disk from Disk Management.
Syntax: delete disk
(Used in Diskpart)
delete partition – Deletes a specified partition from a disk.
Syntax: delete partition
(Used in Diskpart)
delete shadows – Deletes shadow copies.
Syntax: delete shadows [/all | /shadow=ID]
delete volume – Deletes a specified volume from Disk Management.
Syntax: delete volume
(Used in Diskpart)
detach vdisk – Detaches a virtual disk.
Syntax: detach vdisk
(Used in Diskpart)
detail – Displays detailed information about an object in Diskpart.
Syntax: detail disk | volume | partition | vdisk
detail disk – Displays details about a selected disk.
Syntax: detail disk
(Used in Diskpart)
detail partition – Displays details about a selected partition.
Syntax: detail partition
(Used in Diskpart)
detail vdisk – Displays details about a selected virtual disk.
Syntax: detail vdisk
(Used in Diskpart)
detail volume – Displays details about a selected volume.
Syntax: detail volume
(Used in Diskpart)
dfsdiag – Diagnoses issues in DFS (Distributed File System).
Syntax: dfsdiag /test:[option]
dfsdiag testdcs – Tests domain controllers for DFS configuration.
Syntax: dfsdiag /testdcs [/domain:DomainName]
dfsdiag testdfsconfig – Validates DFS configuration.
Syntax: dfsdiag /testdfsconfig [/domain:DomainName]
dfsdiag testdfsintegrity – Checks DFS metadata consistency.
Syntax: dfsdiag /testdfsintegrity [/domain:DomainName]
dfsdiag testreferral – Tests DFS referral responses.
Syntax: dfsdiag /testreferral /target:\\DFSPath
dfsdiag testsites – Tests DFS site settings.
Syntax: dfsdiag /testsites
dfsrmig – Manages DFS replication migration.
Syntax: dfsrmig /setglobalstate [0|1|2|3]
diantz – Compresses files into cabinet (.cab) format.
Syntax: diantz [/options] source [destination]
dir – Displays a list of files and directories.
Syntax: dir [drive:][path] [/A] [/B] [/C]
diskcomp – Compares the contents of two floppy disks.
Syntax: diskcomp [drive1: drive2:]
diskcopy – Copies the contents of one floppy disk to another.
Syntax: diskcopy [drive1: drive2:]
diskpart – A command-line disk management tool.
Syntax: diskpart
(Opens Diskpart CLI)
diskperf – Monitors disk performance counters.
Syntax: diskperf -y | -n
diskraid – Configures RAID arrays from the command line.
Syntax: diskraid
diskshadow – Manages shadow copies of volumes.
Syntax: diskshadow
(Opens Diskshadow CLI)
dispdiag – Collects display diagnostics.
Syntax: dispdiag [/q | /t]
dnscmd – Manages DNS servers.
Syntax: dnscmd [Server] /[Command]
doskey – Edits command lines, recalls commands, and creates macros.
Syntax: doskey [/history | /macros]
driverquery – Displays a list of installed drivers.
Syntax: driverquery [/FO format] [/SI]
dtrace – Used for system-wide tracing on Windows.
Syntax: dtrace -n "probe description"
Windows Commands (E) with Syntax
echo – Displays messages or enables/disables command echoing.
Syntax: echo [on | off | message]
edit – Opens the MS-DOS text editor.
Syntax: edit [filename]
endlocal – Ends localization of environment changes in a batch file.
Syntax: endlocal
end restore – Ends a system restore operation.
Syntax: end restore
(Used in recovery mode)
erase – Deletes one or more files.
Syntax: erase [drive:][path]filename [/F] [/S] [/Q]
eventcreate – Creates a custom event log entry.
Syntax: eventcreate /ID ID /L logname /T type /SO source /D description
Evntcmd – Configures event sources in event logs.
Syntax: Evntcmd [/options] scriptfile
exec – Executes a program or script.
Syntax: exec [program] [arguments]
exit – Exits the command prompt or script.
Syntax: exit [/B] [exitCode]
expand – Extracts files from compressed .cab files.
Syntax: expand [-r] source destination
expand vdisk – Expands the size of a virtual disk.
Syntax: expand vdisk maximum=size
(Used in Diskpart)
expose – Exposes a hidden volume.
Syntax: expose [volume]
extend – Extends a partition or volume.
Syntax: extend [size=n]
(Used in Diskpart)
extract – Extracts files from a compressed archive.
Syntax: extract [/Y] source [destination]
Windows Commands (F) with Syntax
fc – Compares two files and displays the differences.
Syntax: fc [options] file1 file2
filesystems – Displays supported file systems.
Syntax: filesystems
(Used in Diskpart)
find – Searches for a specific text string in a file.
Syntax: find "text" filename
findstr – Searches for a string using advanced options.
Syntax: findstr [options] "text" filename
finger – Displays information about users on a remote system.
Syntax: finger [username]@[host]
flattemp – Manages temporary files in a flat namespace.
Syntax: flattemp [on | off]
fondue – Enables optional Windows features.
Syntax: fondue /enable-feature:FeatureName
for – Runs a command for each file in a set.
Syntax: for %variable in (set) do command
forfiles – Selects files and executes a command on them.
Syntax: forfiles /P path /M pattern /C "command"
format – Formats a disk for use with Windows.
Syntax: format drive: /FS:file-system
freedisk – Checks free space on a disk.
Syntax: freedisk drive:
fsutil – Manages file system behavior.
Syntax: fsutil [operation] [parameters]
fsutil 8dot3name – Manages short (8.3) filenames.
Syntax: fsutil 8dot3name [query | set]
fsutil behavior – Changes file system behavior settings.
Syntax: fsutil behavior set parameter value
fsutil devdrv – Manages device drivers.
Syntax: fsutil devdrv [command]
fsutil dirty – Checks or sets a volume’s dirty bit.
Syntax: fsutil dirty query drive:
fsutil file – Manages files.
Syntax: fsutil file [operation] [parameters]
fsutil fsinfo – Displays file system information.
Syntax: fsutil fsinfo [query]
fsutil hardlink – Creates or manages hard links.
Syntax: fsutil hardlink create newfile existingfile
fsutil objectid – Manages object IDs.
Syntax: fsutil objectid [query | delete | set]
fsutil quota – Manages disk quotas.
Syntax: fsutil quota [track | enforce] drive:
fsutil repair – Repairs file system issues.
Syntax: fsutil repair [query | set]
fsutil reparsepoint – Manages reparse points.
Syntax: fsutil reparsepoint query path
fsutil resource – Manages transactional resource manager.
Syntax: fsutil resource [query | set]
fsutil sparse – Manages sparse files.
Syntax: fsutil sparse [setflag | queryflag]
fsutil tiering – Manages storage tiering.
Syntax: fsutil tiering [query | set]
fsutil transaction – Manages NTFS transactions.
Syntax: fsutil transaction [command]
fsutil usn – Manages update sequence numbers (USN).
Syntax: fsutil usn [query | deletejournal]
fsutil volume – Manages volumes.
Syntax: fsutil volume [query | dismount] drive:
fsutil wim – Manages Windows Imaging Format (WIM).
Syntax: fsutil wim [command]
ftp – Transfers files between systems over FTP.
Syntax: ftp [options] [hostname]
ftp append – Appends data to a file.
Syntax: ftp append localfile remoteFile
ftp ascii – Sets ASCII transfer mode.
Syntax: ftp ascii
ftp bell – Toggles sound on completion.
Syntax: ftp bell
ftp binary – Sets binary transfer mode.
Syntax: ftp binary
ftp bye – Closes FTP session.
Syntax: ftp bye
ftp cd – Changes the directory on the remote system.
Syntax: ftp cd directory
ftp close – Closes the FTP connection.
Syntax: ftp close
ftp debug – Toggles debugging mode.
Syntax: ftp debug
ftp delete – Deletes a file from the remote server.
Syntax: ftp delete filename
ftp dir – Lists files on the remote server.
Syntax: ftp dir [remote-directory]
ftp disconnect – Disconnects from the remote server.
Syntax: ftp disconnect
ftp get – Downloads a file.
Syntax: ftp get remote-file [local-file]
ftp glob – Enables or disables wildcard expansion.
Syntax: ftp glob
ftp hash – Displays hash marks during transfers.
Syntax: ftp hash
ftp lcd – Changes the local working directory.
Syntax: ftp lcd directory
ftp literal – Sends a command directly to the FTP server.
Syntax: ftp literal command
ftp ls – Lists directory contents.
Syntax: ftp ls [directory]
ftp mget – Downloads multiple files.
Syntax: ftp mget files
ftp mkdir – Creates a directory on the remote server.
Syntax: ftp mkdir directory
ftp mls – Lists multiple remote files.
Syntax: ftp mls files
ftp mput – Uploads multiple files.
Syntax: ftp mput files
ftp open – Connects to an FTP server.
Syntax: ftp open hostname
ftp prompt – Toggles interactive mode.
Syntax: ftp prompt
ftp put – Uploads a file to the server.
Syntax: ftp put localfile remotefile
ftp pwd – Displays the current remote directory.
Syntax: ftp pwd
ftp quit – Exits FTP.
Syntax: ftp quit
ftp quote – Sends a raw FTP command.
Syntax: ftp quote command
ftp recv – Downloads a file (same as get).
Syntax: ftp recv remote-file [local-file]
ftp remotehelp – Displays FTP server help.
Syntax: ftp remotehelp
ftp rename – Renames a file on the server.
Syntax: ftp rename oldname newname
ftp rmdir – Removes a remote directory.
Syntax: ftp rmdir directory
ftp send – Uploads a file (same as put).
Syntax: ftp send localfile remotefile
ftp status – Displays FTP status.
Syntax: ftp status
ftp trace – Enables packet tracing.
Syntax: ftp trace
ftp type – Displays or sets transfer mode.
Syntax: ftp type [ascii | binary]
ftp user – Logs into the FTP server.
Syntax: ftp user username
ftp verbose – Toggles verbose mode.
Syntax: ftp verbose
ftp mdelete – Deletes multiple files.
Syntax: ftp mdelete files
ftp mdir – Lists multiple remote directories.
Syntax: ftp mdir directories
ftype – Displays or modifies file types.
Syntax: ftype [fileType[=openCommand]]
fveupdate – Updates BitLocker feature set.
Syntax: fveupdate
Windows Commands (G) with Syntax
getmac – Displays the MAC addresses of network adapters.
Syntax:getmac /v /fo table
gettype – Not a standard Windows command. It may refer to a script or a third-party tool.
goto – Directs batch processing to a labeled line.
Syntax:
goto label
...
:label
command
gpfixup – Used to repair domain-related issues after renaming a domain.
Syntax:gpfixup /olddns:OldDomain /newdns:NewDomain
gpresult – Displays Group Policy settings for a user or computer.
Syntax:gpresult /h report.html
gpt – Not a standalone command in Windows CLI but refers to GUID Partition Table in disk management.
gpupdate – Updates Group Policy settings.
Syntax:gpupdate /force
graftabl – Enables Windows to display extended characters in graphics mode.
Syntax:graftabl [codepage]
Windows Commands (H) with Syntax
help – Displays information about available commands.
Syntax:help [command]
helpctr – Opens the Help and Support Center (older Windows versions).
Syntax:helpctr
hostname – Displays the computer’s hostname.
Syntax:hostname
Windows Commands (I) with Syntax
icacls – Modifies file and folder permissions.
Syntax:icacls filename /grant User:F
if – Performs conditional operations in batch scripts.
Syntax:
if condition (command) else (command)
import (shadowdisk) – Imports a shadow copy set.
Syntax:import setID
import (diskpart) – Imports a foreign disk group.
Syntax:diskpart import diskgroup
inactive – Marks a partition as inactive.
Syntax:inactive
ipconfig – Displays network configuration details.
Syntax:ipconfig /all
ipxroute – Manages IPX routing table entries (older Windows versions).
Syntax:ipxroute [options]
irftp – Sends a file using infrared.
Syntax:irftp filename
Windows Commands (J) with Syntax
jetpack – Compacts and defragments Jet database files.
Syntax:jetpack source destination
Windows Commands (K) with Syntax
klist – Displays a list of cached Kerberos tickets.
Syntax:klist
ksetup – Configures Kerberos authentication settings.
Syntax:ksetup [options]
ksetup addenctypeattr – Adds an encryption type attribute for a realm.
Syntax:ksetup /addenctypeattr realm encryption_type
ksetup addhosttorealmmap – Maps a host to a Kerberos realm.
Syntax:ksetup /addhosttorealmmap hostname realm
ksetup addkdc – Adds a Kerberos Key Distribution Center (KDC) for a realm.
Syntax:ksetup /addkdc realm kdc_name
ksetup addkpasswd – Adds a Kerberos password server for a realm.
Syntax:ksetup /addkpasswd realm password_server
ksetup addrealmflags – Sets specific realm flags.
Syntax:ksetup /addrealmflags realm flag
ksetup changepassword – Changes the computer’s Kerberos password.
Syntax:ksetup /changepassword
ksetup delenctypeattr – Deletes an encryption type attribute for a realm.
Syntax:ksetup /delenctypeattr realm encryption_type
ksetup delhosttorealmmap – Removes a host-to-realm mapping.
Syntax:ksetup /delhosttorealmmap hostname
ksetup delkdc – Removes a KDC for a specified realm.
Syntax:ksetup /delkdc realm kdc_name
ksetup delkpasswd – Removes a Kerberos password server.
Syntax:ksetup /delkpasswd realm password_server
ksetup delrealmflags – Removes specific flags from a realm.
Syntax:ksetup /delrealmflags realm flag
ksetup domain – Sets the Kerberos authentication domain.
Syntax:ksetup /domain domain_name
ksetup dumpstate – Displays the current Kerberos configuration.
Syntax:ksetup /dumpstate
ksetup getenctypeattr – Retrieves encryption type attributes for a realm.
Syntax:ksetup /getenctypeattr realm
ksetup listrealmflags – Lists the realm flags currently set.
Syntax:ksetup /listrealmflags realm
ksetup mapuser – Maps a local user account to a Kerberos principal.
Syntax:ksetup /mapuser principal local_user
ksetup removerealm – Removes a Kerberos realm from the configuration.
Syntax:ksetup /removerealm realm
ksetup server – Configures the Kerberos server.
Syntax:ksetup /server server_name
ksetup setcomputerpassword – Sets the computer’s Kerberos authentication password.
Syntax:ksetup /setcomputerpassword password
ksetup setenctypeattr – Sets encryption type attributes for a realm.
Syntax:ksetup /setenctypeattr realm encryption_type
ksetup setrealm – Defines the default Kerberos realm.
Syntax:ksetup /setrealm realm
ksetup setrealmflags – Sets specific realm flags.
Syntax:ksetup /setrealmflags realm flag
ktmutil – Manages Kernel Transaction Manager (KTM) transactions.
Syntax:ktmutil [options]
ktpass – Configures Kerberos keytab files for interoperability.
Syntax:ktpass /princ principal_name /mapuser user /pass password /out keytab_file
Windows Commands (L) with Syntax
label – Creates, changes, or deletes the volume label of a disk.
Syntax:label [drive:][label]
list – Displays available disks, partitions, volumes, providers, or shadows.
Syntax:list [disk | partition | volume | providers | shadows | writers]
list providers – Lists available Volume Shadow Copy Service (VSS) providers.
Syntax:list providers
list shadows – Lists available shadow copies.
Syntax:list shadows
list writers – Displays the status of VSS writers on the system.
Syntax:list writers
load metadata – Loads a VSS metadata file.
Syntax:load metadata <file>
lodctr – Updates performance counter registry settings from a specified initialization file.
Syntax:lodctr [filename]
logman – Manages Performance Logs and Alerts.
Syntax:logman [command] [options]
logman create – Creates a data collector.
Syntax:logman create [collector_name] [options]
logman create alert – Creates an alert data collector.
Syntax:logman create alert <name> -threshold <value>
logman create api – Creates an API trace data collector.
Syntax:logman create api <name> -p <provider>
logman create cfg – Creates a configuration data collector.
Syntax:logman create cfg <name>
logman create counter – Creates a performance counter data collector.
Syntax:logman create counter <name> -cf <file>
logman create trace – Creates a trace data collector.
Syntax:logman create trace <name> -p <provider>
logman delete – Deletes a data collector.
Syntax:logman delete <name>
logman import and logman export – Imports or exports data collector settings.
Syntax:logman import <filename>
logman export <filename>
logman query – Queries existing data collectors.
Syntax:logman query [options]
logman start and logman stop – Starts or stops a data collector.
Syntax:logman start <name>
logman stop <name>
logman update – Updates a data collector’s settings.
Syntax:logman update <name> [options]
logman update alert – Updates an alert data collector.
Syntax:logman update alert <name> -threshold <value>
logman update api – Updates an API trace data collector.
Syntax:logman update api <name> -p <provider>
logman update cfg – Updates a configuration data collector.
Syntax:logman update cfg <name>
logman update counter – Updates a performance counter data collector.
Syntax:logman update counter <name> -cf <file>
logman update trace – Updates a trace data collector.
Syntax:logman update trace <name> -p <provider>
logoff – Logs off the current user session.
Syntax:logoff [session_id]
lpq – Displays the status of print jobs in a queue.
Syntax:lpq -S <server> -P <printer>
lpr – Sends a file to a network printer.
Syntax:lpr -S <server> -P <printer> <filename>
Windows Commands (M) with Syntax
macfile – Manages Macintosh-accessible files and directories on Windows Server.
Syntax:macfile [command] [options]
makecab – Compresses files into a cabinet (.CAB) file.
Syntax:makecab <source_file> <destination.cab>
manage-bde – Manages BitLocker Drive Encryption.
Syntax:manage-bde [command] <drive> [options]
manage-bde -status – Displays the status of BitLocker encryption.
Syntax:manage-bde -status
manage-bde -on – Enables BitLocker on a specified drive.
Syntax:manage-bde -on <drive>
manage-bde -off – Disables BitLocker on a specified drive.
Syntax:manage-bde -off <drive>
manage-bde -pause – Pauses BitLocker encryption or decryption.
Syntax:manage-bde -pause <drive>
manage-bde -resume – Resumes BitLocker encryption or decryption.
Syntax:manage-bde -resume <drive>
manage-bde -lock – Locks a BitLocker-protected drive.
Syntax:manage-bde -lock <drive>
manage-bde -unlock – Unlocks a BitLocker-protected drive using a password or recovery key.
Syntax:manage-bde -unlock <drive> -RecoveryPassword <password>
manage-bde -autounlock – Enables or disables auto-unlock for a BitLocker-protected drive.
Syntax:manage-bde -autounlock -enable <drive>
manage-bde -protectors – Manages BitLocker key protectors.
Syntax:manage-bde -protectors -add <drive> -RecoveryPassword
manage-bde -tpm – Configures the Trusted Platform Module (TPM) for BitLocker.
Syntax:manage-bde -tpm -status
manage-bde -setidentifier – Sets the BitLocker identifier for a drive.
Syntax:manage-bde -setidentifier <ID>
manage-bde -forcerecovery – Forces a BitLocker recovery mode.
Syntax:manage-bde -forcerecovery <drive>
manage-bde -changepassword – Changes the BitLocker password.
Syntax:manage-bde -changepassword <drive>
manage-bde -changepin – Changes the BitLocker PIN.
Syntax:manage-bde -changepin <drive>
manage-bde -changekey – Changes the BitLocker recovery key.
Syntax:manage-bde -changekey <drive>
manage-bde -keypackage – Exports a BitLocker key package.
Syntax:manage-bde -keypackage <drive> <destination>
manage-bde -upgrade – Upgrades BitLocker metadata for a specified drive.
Syntax:manage-bde -upgrade <drive>
manage-bde -wipefreespace – Wipes free space on a drive to prevent data recovery.
Syntax:manage-bde -wipefreespace <drive>
mapadmin – Manages network drive mappings for administrators.
Syntax:mapadmin [command] [options]
md – Creates a new directory (alias for mkdir).
Syntax:md <directory_name>
merge vdisk – Merges differencing virtual hard disks (VHDs).
Syntax:merge vdisk
mkdir – Creates a new directory.
Syntax:mkdir <directory_name>
mklink – Creates symbolic links and hard links.
Syntax:mklink [/D | /H | /J] <link> <target>
mmc – Opens the Microsoft Management Console.
Syntax:mmc
mode – Configures system devices such as COM ports.
Syntax:mode [device] [options]
more – Displays file contents one screen at a time.
Syntax:more <filename>
mount – Mounts a file system or volume.
Syntax:mount [device] [mount_point]
mountvol – Creates, deletes, or lists a volume mount point.
Syntax:mountvol <drive> <path>
move – Moves files or directories.
Syntax:move <source> <destination>
mqbkup – Backs up message queue files.
Syntax:mqbkup /b <backup_path>
mqsvc – Starts the Message Queuing service.
Syntax:mqsvc
mqtgsvc – Starts the Message Queuing Triggers service.
Syntax:mqtgsvc
msdt – Microsoft Diagnostic Tool.
Syntax:msdt /id <diagnostic_ID>
msg – Sends messages to users on a network.
Syntax:msg <username> <message>
msiexec – Installs, repairs, or removes MSI-based applications.
Syntax:msiexec /i <package.msi>
msinfo32 – Opens the System Information tool.
Syntax:msinfo32
mstsc – Opens the Remote Desktop Connection tool.
Syntax:mstsc /v:<remote_computer>
Windows Commands (N) with Syntax
nbtstat – Displays NetBIOS over TCP/IP (NetBT) statistics and current connections.
Syntax:nbtstat [-a <remote_name>] [-A <IP_address>] [-c] [-n] [-r] [-s] [-S]
netcfg – Installs, configures, and manages network components.
Syntax:netcfg -l <inf_file> -c s -i <protocol|service|client>
netdom – Manages domains, trusts, and computer accounts.
Syntax:netdom <command> <parameters>
net print – Displays print queue status.
Syntax:net print \\<computer_name>\<printer_name>
netsh – Configures and manages network settings.
Syntax:netsh [context] [command]
netstat – Displays network connections and statistics.
Syntax:netstat [-a] [-b] [-e] [-n] [-o] [-p <protocol>] [-r] [-s] [-t] [-x]
nfsadmin – Manages Server for NFS and Client for NFS.
Syntax:nfsadmin server [ComputerName] [Options]
nfsshare – Manages shared directories for NFS.
Syntax:nfsshare <sharename> <path> [options]
nfsstat – Displays statistics about NFS client and server activity.
Syntax:nfsstat [options]
nlbmgr – Manages Network Load Balancing clusters.
Syntax:nlbmgr
nltest – Tests trust relationships and domain controllers.
Syntax:nltest [options]
nslookup – Queries DNS servers for information about domains.
Syntax:nslookup [options] [host]
nslookup exit – Exits the nslookup interactive mode.
Syntax:exit
nslookup finger – Queries information about users on a system (if supported).
Syntax:finger [username]
nslookup help – Displays help for nslookup commands.
Syntax:help
nslookup ls – Lists DNS records for a domain.
Syntax:ls -t <record_type> <domain>
nslookup lserver – Changes the default server to the specified DNS server.
Syntax:lserver <server>
nslookup root – Sets the root server as the current server.
Syntax:root
nslookup server – Specifies a DNS server to use.
Syntax:server <DNS_server>
nslookup set – Configures nslookup settings.
Syntax:set <option>
nslookup set all – Displays current nslookup settings.
Syntax:set all
nslookup set class – Specifies the query class (IN, CH, HS).
Syntax:set class=<value>
nslookup set d2 – Enables detailed debugging mode.
Syntax:set d2
nslookup set debug – Enables debugging mode.
Syntax:set debug
nslookup set domain – Sets the default domain name.
Syntax:set domain=<domain_name>
nslookup set port – Specifies the port number for DNS queries.
Syntax:set port=<port_number>
nslookup set querytype – Specifies the type of DNS record to query (e.g., A, MX, NS).
Syntax:set querytype=<record_type>
nslookup set recurse – Enables or disables recursive queries.
Syntax:set recurse=<on|off>
nslookup set retry – Specifies the number of retry attempts for a query.
Syntax:set retry=<number>
nslookup set root – Specifies the root server.
Syntax:set root=<root_server>
nslookup set search – Enables or disables searching of domains.
Syntax:set search=<on|off>
nslookup set srchlist – Sets the search list for DNS queries.
Syntax:set srchlist=<domain1> <domain2>
nslookup set timeout – Sets the timeout period for queries.
Syntax:set timeout=<seconds>
nslookup set type – Specifies the type of DNS record to query (same as querytype).
Syntax:set type=<record_type>
nslookup set vc – Forces queries to use a virtual circuit (TCP).
Syntax:set vc
nslookup view – Displays cached DNS responses.
Syntax:view
ntbackup – Creates and restores backups.
Syntax:ntbackup [options]
ntcmdprompt – Opens a command prompt inside Windows NT.
Syntax:ntcmdprompt
ntfrsutl – Manages and monitors the File Replication Service (FRS).
Syntax:ntfrsutl [command] [options]
Windows Commands (O) with Syntax
offline – Marks an object (such as a disk or volume) as offline.
Syntax:offline <object>
offline disk – Takes a disk offline.
Syntax:offline disk [disk_number]
offline volume – Takes a volume offline.
Syntax:offline volume [volume_number]
online – Marks an object (such as a disk or volume) as online.
Syntax:online <object>
online disk – Brings a disk online.
Syntax:online disk [disk_number]
online volume – Brings a volume online.
Syntax:online volume [volume_number]
openfiles – Displays files that are open by remote users and allows management of them.
Syntax:openfiles /query [/fo <format>] [/nh]
Windows Commands (P) with Syntax
pagefileconfig – Configures virtual memory settings (pagefile).
Syntax:pagefileconfig /change /s <size> /m <max_size>
path – Displays or sets a search path for executable files.
Syntax:path [<path_list>]
pathping – Traces routes and computes network packet loss statistics.
Syntax:pathping <destination>
pause – Pauses the execution of a batch script.
Syntax:pause
pbadmin – Manages performance baselines (used in diagnostics).
Syntax:pbadmin <command> [options]
pentnt – Detects floating-point division errors in older Intel processors.
Syntax:pentnt [/o]
perfmon – Opens the Performance Monitor tool.
Syntax:perfmon
ping – Sends ICMP echo requests to test network connectivity.
Syntax:ping <IP_address | hostname>
pktmon – Monitors and logs network packets in real time.
Syntax:pktmon [options]
pnpunattend – Automates driver installation for plug-and-play devices.
Syntax:pnpunattend [options]
pnputil – Manages device drivers (install, remove, export).
Syntax:pnputil /add-driver <driver_name>
popd – Restores the previous directory saved by pushd
.
Syntax:popd
powershell – Opens the PowerShell command-line interface.
Syntax:powershell
powershell ise – Opens the PowerShell Integrated Scripting Environment (ISE).
Syntax:powershell_ise
print – Sends a file to a printer.
Syntax:print /d:<printer> <filename>
prncnfg – Configures printers.
Syntax:prncnfg -t -p <printer_name>
prndrvr – Manages printer drivers.
Syntax:prndrvr -a -m <driver_name> -v <version> -e <environment> -i <inf_file>
prnjobs – Manages print jobs.
Syntax:prnjobs -l -p <printer_name>
prnmngr – Manages printers (add/remove/set default).
Syntax:prnmngr -a -p <printer_name> -m <driver_name> -r <port>
prnport – Manages printer ports.
Syntax:prnport -a -r <port_name> -h <IP_address>
prnqctl – Manages print queues.
Syntax:prnqctl -e -p <printer_name>
prompt – Changes the command prompt appearance.
Syntax:prompt [custom_text]
pubprn – Publishes a printer to Active Directory.
Syntax:pubprn -p <printer_name>
pushd – Saves the current directory and changes to a new directory.
Syntax:pushd <path>
pushprinterconnections – Deploys printer connections via Group Policy.
Syntax:pushprinterconnections.exe
pwlauncher – Configures Windows PowerShell as a replacement for Windows Command Prompt.
Syntax:pwlauncher /enable
pwsh – Opens the PowerShell Core shell.
Syntax:pwsh
Windows Commands (Q) with Syntax
qappsrv – Displays a list of all terminal servers on the network.
Syntax:qappsrv [server_name]
qprocess – Displays information about processes running on a remote or local system.
Syntax:qprocess [process_name] [/server:server_name] [/id:session_id] [/user:user_name]
query – Displays information about various system components such as users, processes, and sessions.
Syntax:query <option>
query process – Displays information about processes running on a terminal server.
Syntax:query process [process_name | *] [/server:server_name] [/id:session_id] [/user:user_name]
query session – Displays information about sessions on a terminal server.
Syntax:query session [session_name | session_id | username] [/server:server_name]
query termserver – Lists available terminal servers.
Syntax:query termserver [domain_name]
query user – Displays information about logged-in users on a remote or local system.
Syntax:query user [username | sessionname | sessionID] [/server:server_name]
quser – Displays information about currently logged-on users.
Syntax:quser [username | *] [/server:server_name]
qwinsta – Displays information about remote desktop sessions.
Syntax:qwinsta [sessionname | username | sessionID] [/server:server_name]
Windows Commands (R) with Syntax
rd – Removes an empty directory.
Syntax:rd [drive:]path [/s] [/q]
rdpsign – Signs a Remote Desktop Protocol (RDP) file.
Syntax:rdpsign <filename>
recover – Recovers readable information from a damaged disk.
Syntax:recover [drive:][path]filename
recover disk group – Recovers a disk group in a dynamic disk environment.
Syntax:recover disk group <group_name>
refsutil – A command-line tool for managing ReFS (Resilient File System).
Syntax:refsutil <command> [options]
reg – A command-line tool to manage the Windows Registry.
Syntax:reg <command> [parameters]
reg add – Adds a new registry entry.
Syntax:reg add HKLM\Software\Example /v MyValue /t REG_SZ /d "MyData" /f
reg compare – Compares two registry keys or values.
Syntax:reg compare HKLM\Software\Example HKCU\Software\Example
reg copy – Copies a registry key from one location to another.
Syntax:reg copy HKLM\Software\Source HKLM\Software\Destination /s
reg delete – Deletes a registry key or value.
Syntax:reg delete HKLM\Software\Example /v MyValue /f
reg export – Exports a registry key to a .reg file.
Syntax:reg export HKLM\Software\Example C:\backup.reg
reg import – Imports a registry key from a .reg file.
Syntax:reg import C:\backup.reg
reg load – Loads a registry hive.
Syntax:reg load HKLM\MyHive C:\MyHive.dat
reg query – Displays the contents of a registry key.
Syntax:reg query HKLM\Software\Example
reg restore – Restores a registry hive from a backup.
Syntax:reg restore HKLM\Software C:\backup.hiv
reg save – Saves a registry key to a file.
Syntax:reg save HKLM\Software C:\backup.hiv
reg unload – Unloads a registry hive.
Syntax:reg unload HKLM\MyHive
regini – Modifies registry permissions from the command line.
Syntax:regini script.txt
regsvr32 – Registers or unregisters a DLL or ActiveX control.
Syntax:regsvr32 mydll.dll
relog – Converts or resamples performance logs.
Syntax:relog logfile.blg -f CSV -o output.csv
rem – Adds a comment in a batch file.
Syntax:rem This is a comment
remove – Removes a specific item (varies by context).
Syntax:remove <item>
ren – Renames a file or directory.
Syntax:ren oldfile.txt newfile.txt
rename – Same as ren
, renames files or directories.
Syntax:rename oldfile.txt newfile.txt
repadmin – Replicates Active Directory information.
Syntax:repadmin /syncall
repair – Used to repair specific system components.
Syntax:repair <component>
repair bde – Repairs a BitLocker-encrypted drive.
Syntax:repair-bde C: D: -rp <recovery_password>
replace – Replaces files in a directory.
Syntax:replace sourcefile destination [/A] [/U]
rescan – Scans for new disks.
Syntax:rescan
reset – Resets a system component.
Syntax:reset <component>
reset session – Resets a Remote Desktop session.
Syntax:reset session <sessionID>
retain – Used in disk partitioning.
Syntax:retain
revert – Reverts changes in a system component.
Syntax:revert <component>
rexec – Runs commands on a remote computer.
Syntax:rexec <remote_host> <command>
risetup – Used to set up Remote Installation Services (RIS).
Syntax:risetup
rmdir – Removes a directory.
Syntax:rmdir /s /q C:\example
robocopy – Copies files and directories with advanced options.
Syntax:robocopy C:\source C:\destination /MIR
route ws2008 – Manages network routing tables.
Syntax:route print
rpcinfo – Displays information about RPC services.
Syntax:rpcinfo -p <hostname>
rpcping – Tests RPC connectivity.
Syntax:rpcping -s <server_name>
rsh – Executes commands on a remote computer.
Syntax:rsh <remote_host> <command>
rundll32 – Runs DLLs as commands.
Syntax:rundll32.exe shell32.dll,Control_RunDLL
rundll32 printui – Opens the printer UI.
Syntax:rundll32 printui.dll,PrintUIEntry /?
rwinsta – Resets a remote desktop session.
Syntax:rwinsta <sessionID>
Windows Commands (S) with Syntax
san – Manages storage area networks (SANs).
Syntax:san policy=<policy>
sc config – Configures a service.
Syntax:sc config <service_name> start= auto
sc create – Creates a new service.
Syntax:sc create <service_name> binPath= "<path_to_executable>"
sc delete – Deletes a service.
Syntax:sc delete <service_name>
sc query – Displays information about a service.
Syntax:sc query <service_name>
schtasks – Manages scheduled tasks.
Syntax:schtasks /create /tn "<task_name>" /tr "<command>" /sc daily /st 12:00
scwcmd – Command-line tool for Security Configuration Wizard.
Syntax:scwcmd <command> [options]
scwcmd analyze – Analyzes security policies.
Syntax:scwcmd analyze /p:<policy_name>
scwcmd configure – Applies a security policy.
Syntax:scwcmd configure /p:<policy_name>
scwcmd register – Registers a security policy.
Syntax:scwcmd register /p:<policy_name>
scwcmd rollback – Rolls back a security policy.
Syntax:scwcmd rollback
scwcmd transform – Converts a security policy to a GPO.
Syntax:scwcmd transform /p:<policy_name> /g:<GPO_name>
scwcmd view – Displays security policy details.
Syntax:scwcmd view /p:<policy_name>
secedit – Configures and analyzes system security.
Syntax:secedit <command> [options]
secedit analyze – Analyzes security settings.
Syntax:secedit /analyze /db <database> /cfg <template>
secedit configure – Applies security settings.
Syntax:secedit /configure /db <database> /cfg <template>
secedit export – Exports security settings.
Syntax:secedit /export /cfg <file>
secedit generaterollback – Generates a rollback script.
Syntax:secedit /generaterollback /cfg <file>
secedit import – Imports security settings.
Syntax:secedit /import /db <database> /cfg <template>
secedit validate – Validates a security template.
Syntax:secedit /validate /cfg <file>
select – Selects an object in disk management.
Syntax:select <object>
select disk – Selects a disk for operations.
Syntax:select disk <disk_number>
select partition – Selects a partition for operations.
Syntax:select partition <partition_number>
select vdisk – Selects a virtual disk.
Syntax:select vdisk <vdisk_path>
select volume – Selects a volume for operations.
Syntax:select volume <volume_number>
serverceipoptin – Manages Customer Experience Improvement Program settings.
Syntax:serverceipoptin <option>
servermanagercmd – Command-line tool for Server Manager.
Syntax:servermanagercmd -install <feature_name>
serverweroptin – Manages Windows Error Reporting.
Syntax:serverweroptin <option>
set environmental variables – Sets environment variables.
Syntax:set <variable>=<value>
set shadow copy – Configures shadow copies.
Syntax:vssadmin add shadowstorage /for=<drive> /on=<drive> /maxsize=<size>
set context – Sets execution context.
Syntax:set context=<context>
set id – Changes partition ID.
Syntax:set id=<ID>
setlocal – Begins localization of variables.
Syntax:setlocal ENABLEDELAYEDEXPANSION
set metadata – Modifies metadata settings.
Syntax:set metadata=<option>
set option – Configures options.
Syntax:set option=<value>
set verbose – Enables verbose output.
Syntax:set verbose=1
setspn – Manages Service Principal Names.
Syntax:setspn -L <hostname>
setx – Sets environment variables permanently.
Syntax:setx <variable> "<value>"
sfc – Scans and repairs system files.
Syntax:sfc /scannow
shadow – Manages remote shadowing sessions.
Syntax:shadow <sessionID>
shift – Changes the position of batch file arguments.
Syntax:shift
showmount – Displays NFS mount information.
Syntax:showmount -e <server>
shrink – Reduces partition size.
Syntax:shrink desired=<size>
shutdown – Shuts down or restarts the computer.
Syntax:shutdown /s /t 60
simulate restore – Simulates a restore operation.
Syntax:simulate restore <backup_file>
sort – Sorts input data.
Syntax:sort < input.txt > output.txt
start – Opens a new command prompt window or runs a program.
Syntax:start notepad.exe
subcommand set device – Configures a device.
Syntax:subcommand set device <options>
subcommand set drivergroup – Configures driver groups.
Syntax:subcommand set drivergroup <options>
subcommand set drivergroupfilter – Manages driver group filters.
Syntax:subcommand set drivergroupfilter <options>
subcommand set driverpackage – Configures driver packages.
Syntax:subcommand set driverpackage <options>
subcommand set image – Configures system images.
Syntax:subcommand set image <options>
subcommand set imagegroup – Manages image groups.
Syntax:subcommand set imagegroup <options>
subcommand set server – Configures servers.
Syntax:subcommand set server <options>
subcommand set transportserver – Configures transport servers.
Syntax:subcommand set transportserver <options>
subcommand set multicasttransmission – Configures multicast transmission.
Syntax:subcommand set multicasttransmission <options>
subcommand start namespace – Starts a namespace service.
Syntax:subcommand start namespace <namespace>
subcommand start server – Starts a server service.
Syntax:subcommand start server <server_name>
subcommand start transportserver – Starts a transport server.
Syntax:subcommand start transportserver <server_name>
subcommand stop server – Stops a server service.
Syntax:subcommand stop server <server_name>
subcommand stop transportserver – Stops a transport server.
Syntax:subcommand stop transportserver <server_name>
subst – Maps a path to a drive letter.
Syntax:subst Z: C:\example
sxstrace – Traces side-by-side execution issues.
Syntax:sxstrace trace -logfile=sxs.log
sysocmgr – Manages Windows components.
Syntax:sysocmgr /i:sysoc.inf
systeminfo – Displays system information.
Syntax:systeminfo
Windows Commands (T) with Syntax
takeown – Takes ownership of a file or directory.
Syntax:takeown /f <filename>
tapicfg – Configures Telephony API settings.
Syntax:tapicfg <options>
taskkill – Ends a process.
Syntax:taskkill /IM <process_name> /F
tasklist – Lists running processes.
Syntax:tasklist
tcmsetup – Configures telephony clients.
Syntax:tcmsetup /q
telnet – Opens a Telnet session.
Syntax:telnet <hostname>
telnet close – Closes the Telnet session.
Syntax:close
telnet display – Displays Telnet parameters.
Syntax:display
telnet open – Opens a connection to a remote system.
Syntax:open <hostname> <port>
telnet quit – Exits the Telnet client.
Syntax:quit
telnet send – Sends data through the Telnet connection.
Syntax:send <command>
telnet set – Sets Telnet parameters.
Syntax:set <option> <value>
telnet status – Displays the current Telnet connection status.
Syntax:status
telnet unset – Resets Telnet parameters.
Syntax:unset <option>
tftp – Transfers files using the Trivial File Transfer Protocol.
Syntax:tftp -i <server> GET <filename>
time – Displays or sets system time.
Syntax:time <hh:mm:ss>
timeout – Pauses the command execution for a specified time.
Syntax:timeout <seconds>
title – Changes the title of the command prompt window.
Syntax:title <new_title>
tlntadmn – Manages Telnet services.
Syntax:tlntadmn <command>
tpmtool – Displays and manages the Trusted Platform Module (TPM).
Syntax:tpmtool <command>
tpmvscmgr – Manages TPM virtual smart cards.
Syntax:tpmvscmgr create /name <name> /pin <pin>
tracerpt – Analyzes event trace logs.
Syntax:tracerpt <logfile>
tracert – Traces the route packets take to a host.
Syntax:tracert <hostname>
tree – Displays the directory structure graphically.
Syntax:tree <drive>:\<path>
tscon – Connects a user session to a remote desktop.
Syntax:tscon <session_id> /dest:console
tsdiscon – Disconnects a remote desktop session.
Syntax:tsdiscon <session_id>
tsecimp – Imports Terminal Server Encryption keys.
Syntax:tsecimp <options>
tskill – Ends a process in a terminal session.
Syntax:tskill <process_name>
tsprof – Configures user terminal services profiles.
Syntax:tsprof /query /username:<user>
type – Displays the contents of a text file.
Syntax:type <filename>
typeperf – Monitors system performance counters.
Syntax:typeperf "\Processor(_Total)\% Processor Time"
tzutil – Configures time zones.
Syntax:tzutil /s "<timezone_name>"
Windows Commands (U) with Syntax
unexpose – Removes a previously exposed disk.
Syntax:unexpose <disk>
uniqueid – Displays or sets the unique identifier of a disk.
Syntax:uniqueid disk
unlodctr – Unloads performance counter names and explanations for a service.
Syntax:unlodctr <service_name>
Windows Commands (V) with Syntax
ver – Displays the Windows version.
Syntax:ver
verifier – Starts Driver Verifier to monitor drivers.
Syntax:verifier /query
verify – Controls whether files are written correctly to disk.
Syntax:verify [on | off]
vol – Displays the volume label and serial number.
Syntax:vol <drive_letter>:
vssadmin – Manages Volume Shadow Copy Service (VSS).
Syntax:vssadmin <command>
vssadmin delete shadows – Deletes shadow copies.
Syntax:vssadmin delete shadows /for=<drive> /all
vssadmin list shadows – Lists existing shadow copies.
Syntax:vssadmin list shadows
vssadmin list writers – Displays registered VSS writers.
Syntax:vssadmin list writers
vssadmin resize shadowstorage – Resizes the storage for shadow copies.
Syntax:vssadmin resize shadowstorage /for=<drive> /on=<drive> /maxsize=<size>
Windows Commands (W) with Syntax
waitfor – Sends or waits for a signal on a system.
Syntax:waitfor /si <event_name>
wbadmin – Manages Windows backups.
Syntax:wbadmin <command>
wbadmin delete catalog – Deletes the backup catalog.
Syntax:wbadmin delete catalog
wbadmin delete systemstatebackup – Deletes system state backups.
Syntax:wbadmin delete systemstatebackup -version:<VersionID>
wbadmin disable backup – Disables scheduled backups.
Syntax:wbadmin disable backup
wbadmin enable backup – Enables scheduled backups.
Syntax:wbadmin enable backup -addtarget:<Volume>
wbadmin get disks – Lists available disks.
Syntax:wbadmin get disks
wbadmin get items – Shows items in a backup.
Syntax:wbadmin get items -version:<VersionID>
wbadmin get status – Shows the backup status.
Syntax:wbadmin get status
wbadmin get versions – Lists available backup versions.
Syntax:wbadmin get versions
wbadmin restore catalog – Restores the backup catalog.
Syntax:wbadmin restore catalog -backupTarget:<Volume>
wbadmin start backup – Starts a manual backup.
Syntax:wbadmin start backup -backupTarget:<Volume>
wbadmin start recovery – Restores files or folders.
Syntax:wbadmin start recovery -version:<VersionID>
wbadmin start sysrecovery – Starts a system recovery.
Syntax:wbadmin start sysrecovery
wbadmin start systemstatebackup – Backs up system state data.
Syntax:wbadmin start systemstatebackup -backupTarget:<Volume>
wbadmin start systemstaterecovery – Restores system state data.
Syntax:wbadmin start systemstaterecovery -version:<VersionID>
wbadmin stop job – Stops the running backup/recovery job.
Syntax:wbadmin stop job
wdsutil – Manages Windows Deployment Services.
Syntax:wdsutil /<command>
wecutil – Configures Windows Event Collector.
Syntax:wecutil <command>
wevtutil – Manages Windows Event Logs.
Syntax:wevtutil <command>
where – Locates the file paths of a command.
Syntax:where <filename>
whoami – Displays the current user information.
Syntax:whoami
winnt – Installs Windows NT (older versions).
Syntax:winnt [/option]
winnt32 – Installs Windows in 32-bit mode.
Syntax:winnt32 [/option]
winrs – Runs remote commands.
Syntax:winrs -r:<RemoteComputer> <Command>
winsat mem – Tests memory performance.
Syntax:winsat mem
winsat mfmedia – Tests multimedia performance.
Syntax:winsat mfmedia
wmic – Runs Windows Management Instrumentation commands.
Syntax:wmic <alias> <command>
writer – Displays available VSS writers.
Syntax:writer list
wscript – Executes VBScript and JScript files.
Syntax:wscript <scriptname>
Windows Commands (X) with Syntax
xcopy – Copies files and directories.
Syntax:xcopy <source> <destination> /option