- Command Reference

This site is command references for system engineers.

User Tools

Site Tools

Top     OS ( Linux )     Middleware     Protocol     Hardware     Programming ( Shell Script )     SiteMap


Top     SiteMap




Windows Commands Cheat Sheet

Web Site



Operation Command
Displays CMD.EXE environment variables. set
path displays the current command path. path
Sets the command path in the PATH environment variable path %PATH%;C:\test\bin
Displays detailed configuration information about a computer and its operating system systeminfo
systeminfo /s test-server
systeminfo /s test-server /u testdomain.local\USERNAME
Displays a list of currently running processes tasklist
tasklist /s srvmain
tasklist /s srvmain /u maindom\hiropln /p p@ssW23


Operation Command
Creates connections to terminal servers or other remote computers mstsc.exe
mstsc.exe /? ← Displays help at the command prompt.
mstsc.exe /admin ← Connects you to a session for administering the server.
Start Explorer explorer
Start Calcurator calc


Operation Command
Displays the name of the current directory. cd
Changes the current directory. cd Folder
cd ..
Changes the root directory, the top of the directory hierarchy for a drive. cd \
cd %userprofile%
Displays a list of a directory's files and subdirectories. dir
Displays the directory structure of a path or of the disk tree
Creates a directory or subdirectory mkdir DIRECTORY
Deletes a directory. rd DIRECTORY ← empty directory
rd Folder1\Folder2 ← Delete only Folder2
rd DIRECTORY /s ← including all files
rd DIRECTORY /s /q ← quiet mode


Operation Command
Displays the contents of a text file. type FILE
more FILE ← Displays one screen of output at a time.
Copies one or more files from one location to another. copy FILE FOLDER
copy /y FILE1 FILE2
← Suppresses prompting to confirm that you overwrite an existing destination file.
Deletes one or more files. del FILE
del /Q FILE
← /Q : Quiet mode, do not give a Yes/No Prompt before deleting.
del /S FILE
← /S Delete from all Subfolders (DELTREE)
del /F FILE
← /F : Ignore read-only setting and delete anyway (FORCE)
erase FILE
Renames files or directories. ren SRC DES
rename SRC DES
MIRror a directory tree robocopy SOURCE_FOLDER DESTINATION_FOLDER /mir
robocopy "C:\data" "\\\C$\data" /mir
robocopy d: g: /mir
robocopy more


Operation Command
Verifies IP-level connectivity to another TCP/IP computer ping HOSTNAME
ping -t HOST
← continue sending Echo Request messages to the destination until interrupted.
← To interrupt and quit ping, press CTRL+C.
Displays all current TCP/IP network configuration values. ipconfig
ipconfig /all ← Display full configuration information.
Display route details netstat -rn
route print
Add a route route add mask ← network
route add mask ← host
route add -p mask
← “-p” Create a persistent route
If you want to contain rouring after reboot the system, you must add “-p” option.
Delete the route route delete mask ← network
route delete mask ← host
Change th route route change mask
Display hostname from IP nbtstat -a IP_ADDRESS


Operation Command
Displays information that you can use to diagnose DNS infrastructure. nslookup
nslookup -type=soa HOSTNAME
nslookup -type=any HOSTNAME DNSSERVER
Flushes and resets the contents of the DNS client resolver cache. ipconfig /flushdns

MAC address

Operation Command
Returns the MAC address getmac
getmac /s srvmain
getmac /s srvmain /u maindom\hiropln /p p@ssW23
Displays entries in the ARP cache arp -a
Deletes an entry in the ARP cache with a specific IP arp -d


Operation Command
Displays active TCP connections, ports netstat -an
← -a : Displays all active TCP connections and the TCP and UDP ports
← -n : addresses and port numbers are expressed numerically
netstat -an |find "80"

net command

Operation Command
net help
displays user account information net user
net user USERNAME ← detail
change Password net user USER01 PASSWORD
displays the name of the server and the names of local groups on the computer. net localgroup
net session
net accounts
Operation Command
net share
net use


Operation Command
List Time Server w32tm /query /source
list ntp status w32tm /query /status
w32tm /query /status /verbose
Restart Windows Time net stop w32time && net start w32time

Additional Commands


Commnad Note
GNU utilities for Win32
find, date, grep , etc


os/windows/command/index.html.txt · Last modified: 2017/01/26 by admin