CMD commands

Windows Command Prompt shell interpreter

414 commands

Navigation & File System

  • cd

    Print the current working directory path

  • cd <directory>

    Change the current working directory

  • cd ..

    Move up one level to the parent directory

  • cd \

    Navigate to the root of the current drive

  • cd /d <drive>:\<path>

    Change both the drive and directory at the same time

  • <drive>:

    Switch to a different drive (e.g., D:)

  • dir

    List all files and folders in the current directory

  • dir /a

    List all files including hidden and system files

  • dir /a:h

    List only hidden files

  • dir /a:d

    List only directories

  • dir /s

    List all files in the directory and all subdirectories

  • dir /b

    Display only file and folder names in bare format

  • dir /o:n

    List files sorted alphabetically by name

  • dir /o:s

    List files sorted by size

  • dir /o:d

    List files sorted by date

  • dir /o:-d

    List files sorted by date in reverse order

  • dir /p

    List files one page at a time

  • dir /w

    List files in wide format using multiple columns

  • dir <pattern>

    List files matching a specific pattern (e.g., dir *.txt)

  • dir /s /b <pattern>

    Recursively search and list files matching a pattern

  • pushd <path>

    Save the current directory and navigate to a new path

  • popd

    Return to the directory saved by pushd

  • tree

    Display the directory structure as an ASCII tree

  • tree /f

    Display the directory tree including file names

  • tree /a

    Display the tree using ASCII characters instead of graphic ones

File & Directory Operations

  • mkdir <directory>

    Create a new directory

  • md <directory>

    Alias for mkdir, creates a new directory

  • mkdir <path\subpath>

    Create a directory and all required parent directories

  • rmdir <directory>

    Remove an empty directory

  • rd <directory>

    Alias for rmdir, removes an empty directory

  • rmdir /s <directory>

    Recursively delete a directory and all its contents

  • rmdir /s /q <directory>

    Quietly delete a directory and all its contents without prompting

  • del <file>

    Delete a file

  • del /f <file>

    Forcefully delete a read-only file

  • del /q <file>

    Delete a file without asking for confirmation

  • del /s <pattern>

    Delete matching files in all subdirectories

  • del /f /q /s <pattern>

    Force-delete files recursively without prompting

  • erase <file>

    Alias for del, deletes a file

  • copy <source> <destination>

    Copy a file to a destination

  • copy /y <source> <destination>

    Copy a file without prompting to confirm overwrite

  • copy /b <source> <destination>

    Copy a file in binary mode

  • copy <file1>+<file2> <destination>

    Concatenate multiple files into one destination file

  • xcopy <source> <destination>

    Copy files and directory trees

  • xcopy <source> <destination> /e

    Copy all subdirectories including empty ones

  • xcopy <source> <destination> /s

    Copy subdirectories excluding empty directories

  • xcopy <source> <destination> /h

    Copy hidden and system files

  • xcopy <source> <destination> /y

    Copy without prompting to overwrite destination files

  • xcopy <source> <destination> /q

    Copy quietly without displaying file names

  • xcopy <source> <destination> /i

    Assume destination is a directory if it does not exist

  • xcopy <source> <destination> /exclude:<file>

    Copy excluding files listed in an exclusion file

  • robocopy <source> <destination>

    Robust file copy for Windows with advanced options

  • robocopy <source> <destination> /e

    Copy all subdirectories including empty ones

  • robocopy <source> <destination> /s

    Copy all subdirectories excluding empty ones

  • robocopy <source> <destination> /mir

    Mirror the source to destination, deleting extra files

  • robocopy <source> <destination> /move

    Move files and directories, deleting them from source

  • robocopy <source> <destination> /z

    Copy in restartable mode for interrupted transfers

  • robocopy <source> <destination> /xf <file>

    Exclude specific files during robocopy

  • robocopy <source> <destination> /xd <dir>

    Exclude specific directories during robocopy

  • robocopy <source> <destination> /log:<file>

    Write robocopy output to a log file

  • move <source> <destination>

    Move or rename a file or directory

  • move /y <source> <destination>

    Move a file without prompting to overwrite

  • ren <oldname> <newname>

    Rename a file or directory

  • rename <oldname> <newname>

    Alias for ren, renames a file or directory

  • type nul > <file>

    Create a new empty file

  • echo. > <file>

    Create a new file with a single blank line

  • mklink <link> <target>

    Create a symbolic link to a file

  • mklink /d <link> <target>

    Create a symbolic link to a directory

  • mklink /h <link> <target>

    Create a hard link to a file

  • mklink /j <link> <target>

    Create a directory junction (soft link for directories)

  • attrib <file>

    Display the attributes of a file

  • attrib +h <file>

    Set a file as hidden

  • attrib -h <file>

    Remove the hidden attribute from a file

  • attrib +r <file>

    Set a file as read-only

  • attrib -r <file>

    Remove the read-only attribute from a file

  • attrib +s <file>

    Set the system attribute on a file

  • attrib /s /d <pattern>

    Apply attribute changes recursively to subdirectories

  • compact /c <file>

    Compress a file using NTFS compression

  • compact /u <file>

    Uncompress a file using NTFS compression

File Viewing & Content

  • type <file>

    Display the contents of a text file

  • type <file> | more

    Display file contents one page at a time

  • more <file>

    Display file contents one screen at a time

  • more /e <file>

    Display file contents with extended features enabled

  • find "<string>" <file>

    Search for a specific string in a file

  • find /i "<string>" <file>

    Search for a string case-insensitively

  • find /n "<string>" <file>

    Search for a string and show matching line numbers

  • find /v "<string>" <file>

    Print lines that do NOT contain the string

  • find /c "<string>" <file>

    Count the number of lines containing the string

  • findstr <pattern> <file>

    Search for a pattern or string in a file

  • findstr /i <pattern> <file>

    Search for a pattern case-insensitively

  • findstr /r <pattern> <file>

    Search using a regular expression pattern

  • findstr /s <pattern> <path>

    Recursively search files in the current and subdirectories

  • findstr /n <pattern> <file>

    Show the line numbers of matching lines

  • findstr /v <pattern> <file>

    Print lines that do NOT match the pattern

  • findstr /l <string> <file>

    Search for a literal string instead of a regex

  • findstr /c:"<string>" <file>

    Search for an exact literal string with spaces

  • findstr /m <pattern> <files>

    Print only the names of files containing matches

  • comp <file1> <file2>

    Compare the contents of two files

  • fc <file1> <file2>

    Compare two files and display the differences

  • fc /b <file1> <file2>

    Compare two files in binary mode

  • fc /i <file1> <file2>

    Compare two files ignoring case differences

  • fc /n <file1> <file2>

    Compare text files and display line numbers with differences

System Information

  • systeminfo

    Display detailed Windows configuration information

  • systeminfo | findstr /b /c:"OS"

    Display only OS information from systeminfo

  • ver

    Display the current Windows version

  • hostname

    Display the name of the current computer

  • whoami

    Display the current domain and username

  • whoami /all

    Display current user, groups, and privileges

  • whoami /groups

    Display the groups the current user belongs to

  • whoami /priv

    Display the privileges of the current user

  • date

    Display or set the current date

  • date /t

    Display the current date without prompting to change it

  • time

    Display or set the current time

  • time /t

    Display the current time without prompting to change it

  • set

    Display all environment variables in the current session

  • set <variable>

    Display the value of a specific environment variable

  • set <variable>=<value>

    Set an environment variable for the current session

  • setx <variable> <value>

    Permanently set an environment variable for the user

  • setx <variable> <value> /m

    Permanently set an environment variable system-wide

  • echo %<variable>%

    Display the value of an environment variable

  • echo %USERNAME%

    Display the current logged-in username

  • echo %COMPUTERNAME%

    Display the computer name

  • echo %OS%

    Display the operating system name

  • echo %PROCESSOR_ARCHITECTURE%

    Display the processor architecture

  • echo %USERPROFILE%

    Display the path to the current user's profile directory

  • echo %TEMP%

    Display the path to the temporary files directory

  • echo %PATH%

    Display the current system PATH

  • wmic os get caption

    Display the operating system name via WMI

  • wmic os get version

    Display the operating system version via WMI

  • wmic cpu get name

    Display the CPU name via WMI

  • wmic memorychip get capacity

    Display the RAM capacity of each module via WMI

  • wmic diskdrive get model,size

    Display disk drive models and sizes via WMI

  • wmic bios get serialnumber

    Display the system BIOS serial number via WMI

  • wmic product get name

    List all installed software products via WMI

  • wmic process list brief

    List all running processes with basic info via WMI

  • wmic service list brief

    List all Windows services with brief info via WMI

  • msinfo32

    Open the System Information graphical tool

Process Management

  • tasklist

    List all currently running processes

  • tasklist /fi "IMAGENAME eq <name>"

    Filter processes by executable name

  • tasklist /fi "STATUS eq running"

    List only processes with a running status

  • tasklist /fi "PID eq <pid>"

    List a specific process by its PID

  • tasklist /svc

    List processes along with their hosted services

  • tasklist /v

    List processes with verbose details

  • tasklist /m

    List processes along with DLLs they have loaded

  • tasklist /fo csv

    List processes in CSV output format

  • tasklist /fo table

    List processes in formatted table output

  • taskkill /im <name>

    Terminate a process by its executable name

  • taskkill /pid <pid>

    Terminate a process by its PID

  • taskkill /im <name> /f

    Forcefully terminate a process by name

  • taskkill /pid <pid> /f

    Forcefully terminate a process by PID

  • taskkill /im <name> /t

    Terminate a process and all its child processes

  • taskkill /f /im <name> /t

    Forcefully terminate a process tree

  • start <program>

    Start a new program or command in a new window

  • start "<title>" <program>

    Start a program in a new window with a custom title

  • start /wait <program>

    Start a program and wait for it to finish

  • start /min <program>

    Start a program in a minimized window

  • start /max <program>

    Start a program in a maximized window

  • start /b <program>

    Start a program in the background without a new window

  • timeout /t <seconds>

    Pause execution for a specified number of seconds

  • timeout /t <seconds> /nobreak

    Pause without allowing keyboard interruption

  • ping -n 1 127.0.0.1 > nul && <command>

    Delay a command by using a ping as a timer

Network

  • ping <host>

    Send ICMP echo requests to test connectivity to a host

  • ping <host> -n <count>

    Send a specified number of ping packets to a host

  • ping <host> -t

    Ping a host continuously until stopped manually

  • ping <host> -l <size>

    Ping with a specified packet size

  • ping <host> -4

    Force ping to use IPv4

  • ping <host> -6

    Force ping to use IPv6

  • ping <host> -a

    Resolve the hostname from an IP address when pinging

  • ipconfig

    Display IP configuration for all network adapters

  • ipconfig /all

    Display full IP configuration details for all adapters

  • ipconfig /release

    Release the DHCP IP address for all adapters

  • ipconfig /renew

    Renew the DHCP IP address for all adapters

  • ipconfig /flushdns

    Flush and reset the DNS resolver cache

  • ipconfig /displaydns

    Display the contents of the DNS resolver cache

  • ipconfig /registerdns

    Refresh DHCP leases and re-register DNS names

  • nslookup <domain>

    Query DNS to find the IP address of a domain

  • nslookup <domain> <dns-server>

    Query a specific DNS server for a domain

  • nslookup -type=<type> <domain>

    Query a specific DNS record type

  • tracert <host>

    Trace the network route packets take to a host

  • tracert -d <host>

    Trace route without resolving hostnames

  • tracert -h <hops> <host>

    Trace route with a maximum number of hops

  • pathping <host>

    Trace a route and measure packet loss at each hop

  • netstat

    Display active network connections and listening ports

  • netstat -a

    Display all active connections and listening ports

  • netstat -n

    Display connections with numeric IP addresses and ports

  • netstat -an

    Display all connections with numeric addresses

  • netstat -b

    Display the executable involved in each connection

  • netstat -o

    Display process IDs associated with each connection

  • netstat -ano

    Display all connections with addresses and PIDs numerically

  • netstat -r

    Display the routing table

  • netstat -e

    Display Ethernet statistics

  • netstat -s

    Display per-protocol statistics

  • netstat -p <protocol>

    Display connections for a specific protocol

  • net view

    Display a list of computers in the current network

  • net view \\<computer>

    List shared resources on a specific computer

  • net use

    List all current network connections and mapped drives

  • net use <drive>: \\<host>\<share>

    Map a network share to a drive letter

  • net use <drive>: /delete

    Disconnect a mapped network drive

  • net share

    Display all shared resources on the local computer

  • net share <name>=<path>

    Create a new network share

  • net share <name> /delete

    Delete an existing network share

  • arp -a

    Display the ARP cache showing IP-to-MAC mappings

  • arp -d <ip>

    Delete a specific entry from the ARP cache

  • arp -s <ip> <mac>

    Add a static ARP entry

  • route print

    Display the full routing table

  • route add <destination> mask <mask> <gateway>

    Add a new route to the routing table

  • route delete <destination>

    Delete a route from the routing table

  • netsh wlan show profiles

    List all saved Wi-Fi profiles

  • netsh wlan show profile name="<ssid>" key=clear

    Display a Wi-Fi profile including the saved password

  • netsh wlan connect name="<ssid>"

    Connect to a saved Wi-Fi network

  • netsh wlan disconnect

    Disconnect from the current Wi-Fi network

  • netsh interface ip set address <adapter> static <ip> <mask> <gateway>

    Set a static IP address on a network adapter

  • netsh interface ip set address <adapter> dhcp

    Set a network adapter to use DHCP

  • netsh advfirewall set allprofiles state on

    Enable Windows Firewall for all profiles

  • netsh advfirewall set allprofiles state off

    Disable Windows Firewall for all profiles

  • netsh advfirewall firewall add rule name="<n>" protocol=TCP dir=in localport=<port> action=allow

    Add a firewall rule to allow inbound TCP traffic on a port

  • netsh advfirewall firewall delete rule name="<n>"

    Delete a specific firewall rule by name

  • ftp <host>

    Open an FTP connection to a remote host

  • curl <url>

    Transfer data from a URL (available in Windows 10+)

  • curl -o <file> <url>

    Download a URL and save it to a file

User & Account Management

  • net user

    List all local user accounts

  • net user <username>

    Display detailed information about a specific user account

  • net user <username> <password> /add

    Create a new local user account with a password

  • net user <username> /delete

    Delete a local user account

  • net user <username> <password>

    Change the password for a local user account

  • net user <username> /active:yes

    Enable a disabled user account

  • net user <username> /active:no

    Disable a user account

  • net user <username> /passwordreq:yes

    Require a password for a user account

  • net user <username> /expires:<date>

    Set an expiration date for a user account

  • net localgroup

    List all local groups

  • net localgroup <group>

    Display members of a specific local group

  • net localgroup <group> <user> /add

    Add a user to a local group

  • net localgroup <group> <user> /delete

    Remove a user from a local group

  • net localgroup <group> /add

    Create a new local group

  • net localgroup <group> /delete

    Delete a local group

  • runas /user:<domain>\<user> <command>

    Run a command as a different user

  • runas /user:Administrator <command>

    Run a command as the Administrator user

  • net accounts

    Display password and logon policy for the local computer

  • net accounts /maxpwage:<days>

    Set the maximum password age in days

  • net accounts /minpwlen:<length>

    Set the minimum password length

Services Management

  • sc query

    List the status of all services

  • sc query <service>

    Display the status of a specific service

  • sc query type= all

    List all services and drivers

  • sc query state= all

    List all services regardless of their state

  • sc start <service>

    Start a service

  • sc stop <service>

    Stop a running service

  • sc pause <service>

    Pause a running service

  • sc continue <service>

    Resume a paused service

  • sc config <service> start= auto

    Set a service to start automatically

  • sc config <service> start= demand

    Set a service to start manually

  • sc config <service> start= disabled

    Disable a service from starting

  • sc create <service> binPath= "<path>"

    Create a new service with a binary path

  • sc delete <service>

    Mark a service for deletion

  • sc description <service> "<desc>"

    Set a description for a service

  • net start

    List all currently running services

  • net start <service>

    Start a Windows service by name

  • net stop <service>

    Stop a Windows service by name

  • net pause <service>

    Pause a running service

  • net continue <service>

    Continue a paused service

Disk & Storage

  • diskpart

    Open the interactive disk partitioning tool

  • chkdsk

    Check the current drive for errors

  • chkdsk <drive>:

    Check a specific drive for file system errors

  • chkdsk <drive>: /f

    Check and fix file system errors on a drive

  • chkdsk <drive>: /r

    Locate bad sectors and recover readable data

  • chkdsk <drive>: /x

    Force dismount before checking (use with /f)

  • format <drive>:

    Format a disk drive

  • format <drive>: /fs:NTFS

    Format a drive with the NTFS file system

  • format <drive>: /fs:FAT32

    Format a drive with the FAT32 file system

  • format <drive>: /q

    Quick format a drive

  • label <drive>: <name>

    Set or change the volume label of a drive

  • vol <drive>:

    Display the volume label and serial number of a drive

  • fsutil volume diskfree <drive>:

    Display free and total disk space for a drive

  • fsutil file createnew <file> <size>

    Create a new file of a specified size in bytes

  • subst <drive>: <path>

    Assign a drive letter to a folder path

  • subst <drive>: /d

    Remove a substituted drive letter

  • subst

    List all current drive substitutions

  • defrag <drive>: /u /v

    Defragment a drive with progress reporting

  • defrag <drive>: /a

    Analyze a drive without defragmenting

Batch Scripting

  • @echo off

    Turn off command echoing for the rest of the script

  • echo <message>

    Print a message to the console

  • echo.

    Print a blank line to the console

  • echo %<variable>%

    Print the value of a variable

  • set <variable>=<value>

    Set a variable in the current batch session

  • set /p <variable>=<prompt>

    Prompt the user to input a value for a variable

  • set /a <variable>=<expression>

    Evaluate an arithmetic expression and store the result

  • if <condition> <command>

    Execute a command if a condition is true

  • if exist <file> <command>

    Execute a command if a file exists

  • if not exist <file> <command>

    Execute a command if a file does not exist

  • if %<variable>%==<value> <command>

    Execute a command if a variable equals a value

  • if /i %<variable>%==<value> <command>

    Case-insensitive comparison of a variable to a value

  • if %errorlevel%==0 <command>

    Execute a command if the previous command succeeded

  • if defined <variable> <command>

    Execute a command if a variable is defined

  • if not defined <variable> <command>

    Execute a command if a variable is not defined

  • if <n1> gtr <n2> <command>

    Execute a command if n1 is greater than n2

  • if <n1> lss <n2> <command>

    Execute a command if n1 is less than n2

  • if <n1> equ <n2> <command>

    Execute a command if n1 equals n2

  • if <n1> neq <n2> <command>

    Execute a command if n1 does not equal n2

  • for %i in (<set>) do <command>

    Loop through a set of values

  • for /l %i in (<start>,<step>,<end>) do <command>

    Numeric for loop from start to end with step increment

  • for /f %i in (<file>) do <command>

    Loop through each line of a file

  • for /f "tokens=*" %i in ('<command>') do <cmd>

    Loop through the output of a command

  • for /r <path> %i in (<pattern>) do <command>

    Recursively loop through files matching a pattern

  • for /d %i in (<pattern>) do <command>

    Loop through matching directories only

  • goto <label>

    Jump script execution to a labelled section

  • :<label>

    Define a label to jump to with goto

  • call <script>.bat

    Call and run another batch script

  • call :<subroutine>

    Call a subroutine defined in the same batch file

  • exit /b <code>

    Exit the current batch script with an exit code

  • exit <code>

    Exit the command prompt session with an exit code

  • %~1

    Get the first argument passed to the script, removing quotes

  • %~dp0

    Get the drive and path of the batch file itself

  • %~f1

    Get the fully qualified path of the first argument

  • %~n1

    Get the filename without extension from the first argument

  • %~x1

    Get the file extension from the first argument

  • pause

    Pause execution and wait for the user to press a key

  • choice /c <chars> /m <message>

    Prompt the user to press one of a set of characters

  • setlocal

    Begin local environment changes in a script

  • endlocal

    End local environment changes and restore original environment

  • setlocal enabledelayedexpansion

    Enable delayed variable expansion using !variable! syntax

  • enableextensions

    Enable command extensions for enhanced batch features

  • rem <comment>

    Add a comment to a batch script (not executed)

  • :: <comment>

    Add a comment using the double-colon syntax

Redirection & Pipelines

  • <command> > <file>

    Redirect command output to a file, overwriting it

  • <command> >> <file>

    Redirect command output and append it to a file

  • <command> < <file>

    Use a file as standard input for a command

  • <command> 2> <file>

    Redirect error output to a file

  • <command> 2>> <file>

    Append error output to a file

  • <command> 2>&1

    Redirect stderr to the same destination as stdout

  • <command> > <file> 2>&1

    Redirect both stdout and stderr to a file

  • <command> > nul

    Discard standard output

  • <command> > nul 2>&1

    Discard both standard output and error output

  • <command1> | <command2>

    Pipe the output of command1 as input to command2

  • <command1> && <command2>

    Run command2 only if command1 succeeds

  • <command1> || <command2>

    Run command2 only if command1 fails

  • <command1> & <command2>

    Run command1 then command2 unconditionally

  • <command> | clip

    Pipe the output of a command to the clipboard

  • <command> | more

    Pipe output through the more pager

  • <command> | find "<string>"

    Pipe output and filter for a specific string

  • <command> | findstr "<pattern>"

    Pipe output and filter using a pattern or regex

  • <command> | sort

    Pipe output and sort it alphabetically

  • <command> | sort /r

    Pipe output and sort it in reverse order

System Administration

  • shutdown /s

    Shut down the local computer

  • shutdown /s /t <seconds>

    Shut down the computer after a specified delay

  • shutdown /r

    Restart the local computer

  • shutdown /h

    Hibernate the local computer

  • shutdown /l

    Log off the current user

  • shutdown /a

    Abort a pending shutdown

  • shutdown /m \\<computer> /s

    Remotely shut down another computer

  • shutdown /r /o

    Restart into the Advanced Boot Options menu

  • gpupdate

    Refresh Group Policy settings

  • gpupdate /force

    Force a full refresh of all Group Policy settings

  • gpresult /r

    Display the Resultant Set of Policy for the current user

  • gpresult /h <file>.html

    Generate an HTML Group Policy report

  • sfc /scannow

    Scan and repair protected Windows system files

  • sfc /verifyonly

    Scan system files for integrity without repairing

  • dism /online /cleanup-image /restorehealth

    Scan and repair the Windows image using DISM

  • dism /online /cleanup-image /scanhealth

    Scan the Windows image for corruption

  • dism /online /cleanup-image /checkhealth

    Check if the Windows image is flagged as corrupted

  • reg query <key>

    Query and display registry key values

  • reg query <key> /v <valuename>

    Query a specific registry value

  • reg add <key> /v <name> /t <type> /d <data>

    Add or update a registry value

  • reg delete <key> /v <valuename>

    Delete a specific registry value

  • reg delete <key>

    Delete a registry key and all its values

  • reg export <key> <file>.reg

    Export a registry key to a .reg file

  • reg import <file>.reg

    Import a .reg file into the registry

  • reg copy <source> <destination>

    Copy a registry key and all its subkeys to another location

  • regedit

    Open the graphical Registry Editor

  • msconfig

    Open the System Configuration tool

  • eventvwr

    Open the Event Viewer

  • devmgmt.msc

    Open the Device Manager

  • services.msc

    Open the Services management console

  • compmgmt.msc

    Open the Computer Management console

  • diskmgmt.msc

    Open the Disk Management console

  • taskschd.msc

    Open the Task Scheduler

  • control

    Open the Control Panel

  • control <applet>

    Open a specific Control Panel applet

  • wuauclt /detectnow

    Force Windows Update to check for updates immediately

  • bcdedit

    Display and manage the boot configuration data

  • bcdedit /enum

    List all boot entries in the boot configuration

Miscellaneous

  • cls

    Clear the command prompt screen

  • help

    Display a list of built-in CMD commands with brief descriptions

  • help <command>

    Display help documentation for a specific command

  • <command> /?

    Display help and usage information for any command

  • color <attr>

    Change the foreground and background colors of the console

  • color 0a

    Set black background with green text

  • title <text>

    Set the title of the current command prompt window

  • prompt <text>

    Change the command prompt text

  • prompt $P$G

    Reset the prompt to show current directory and >

  • mode con cols=<n> lines=<n>

    Set the console window size in columns and lines

  • doskey <alias>=<command>

    Create a command alias (macro) in CMD

  • doskey /history

    Display the command history for the current session

  • doskey /macros

    List all currently defined macros

  • clip

    Copy stdin or piped output to the Windows clipboard

  • sort

    Sort the lines of input alphabetically

  • sort /r

    Sort the lines of input in reverse order

  • sort /+<n>

    Sort starting from character position <n>

  • assoc

    Display all file extension associations

  • assoc .<ext>

    Display the file type associated with an extension

  • assoc .<ext>=<filetype>

    Associate a file extension with a file type

  • ftype

    Display all file type open commands

  • ftype <filetype>

    Display the open command for a specific file type

  • ftype <filetype>=<command>

    Set the open command for a file type

  • where <command>

    Find the location of an executable in the PATH

  • certutil -hashfile <file> MD5

    Compute the MD5 hash of a file

  • certutil -hashfile <file> SHA256

    Compute the SHA256 hash of a file

  • certutil -encode <infile> <outfile>

    Base64-encode a file

  • certutil -decode <infile> <outfile>

    Base64-decode a file

  • cipher /e <file>

    Encrypt a file using NTFS EFS encryption

  • cipher /d <file>

    Decrypt an EFS-encrypted file

  • cipher /w:<path>

    Securely wipe free space on a drive

  • fc /b <file1> <file2>

    Compare two files byte by byte

  • powercfg /batteryreport

    Generate a detailed battery usage report

  • powercfg /energy

    Analyze power usage and generate an energy report

  • powercfg /list

    List all available power plans

  • powercfg /setactive <scheme>

    Set the active power plan