- Cheat Sheet and Example is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools






Windows Commands Cheat Sheet


I have developed cmdLauncher.
cmd Launcher is Input search type launcher
cmdLauncher is a useful launcher for Microsoft Windows.
You can easily access the software, file, folder you registerd.

Web Site



command /?

  systeminfo  /?
  robocopy /?
  net /?
  net user /?
  shutdown /?


Operation Command
shutdown shutdown /s /t 10
/s = Shutdown the computer.
/t xxx = Set the time-out period before shutdown to xxx seconds.
shutdown /r /t 10
/r = Full shutdown and restart the computer.
Displays environment variables. set ← cmd
Get-ChildItem env: ← powershell
echo %Path% ← cmd
Get-ChildItem env:Path ← powershell
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 SERVER
tasklist /s SERVER /u TESTDOMAIN\USER01 /p P@ssw0rd
Change the character code chcp 437 ← English
chcp 932 ← Japanese


Operation Command
Creates connections to terminal servers or other remote computers mstsc
mstsc /? ← Displays help at the command prompt.
mstsc /admin ← Connects you to a session for administering the server.
mstsc /f ← fullscreen
mstsc /w:1600 /h:1200
mstsc /v:
mstsc /v: /w:1600 /h:1200
Start Explorer explorer
explorer . ← start Explorer with current folder
Start Calcurator calc
Microsoft Management Console(mmc) mmc

Control panel tool Command

Operation Command
Network Conection properties administration ncpa.cpl
Internet Properties control inetcpl.cpl
Mouse Properties control main.cpl
Sound Properties control mmsys.cpl
System Properties control sysdm.cpl
Display Properties control desk.cpl
Add/Remove Programs control appwiz.cpl


Operation Command
Displays the name of the current directory. cd
Change Drive c:
cd /d d:
Changes the current directory. cd Folder
cd %VAGRANT_HOME% ← cmd
cd $env:VAGRANT_HOME ← powerhsell
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.
Check Port connection Test-NetConnection <HOST> -Port <PORT>
Test-NetConnection -Port 22
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 |Select-String 80 ← Powershell
netstat -an |find "80" ← CMD

net command

Operation Command
net help
displays user account information net user
net user USERNAME ← detail
net user USERNAME /domain ← Active Directory
net user mark /domain ← Active Directory
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
Time Configuration w32tm /query /configuration
List Time Server w32tm /query /source
list ntp status w32tm /query /status
w32tm /query /status /verbose ← check offset
w32tm /resync
Restart Windows Time net stop w32time && net start w32time
check offset w32tm /stripchart /computer:xx.xx.xx.xx
w32tm /monitor /  <- check
w32tm /config /,0x8 /syncfromflags:manual   <- 0x8 is client mode
w32tm /config /update
w32tm /resync
net stop w32time
net start w32time
w32tm /query /status /verbose  <- check offset
Check NTP Registory
>Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\w32time\Parameters" 

## Enable NTP
>Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\w32time\Parameters" -Name "NtpServer" -Value ",0x8"

Group Policy

Operation Command
Check RSoP(Resultant Set of Policy) rsop
Displays the Resultant Set of Policy (RSoP) gpresult /? # Displays this help message.
gpresult /R # Displays RSoP summary data.
gpresult /V # Specifies that verbose information should be displayed.
gpresult /Z # Specifies that super-verbose information should be displayed.
gpresult /H check.html #
gpresult /USER targetusername /V
Display user infomation, Security Group net user /domain USER
net user /domain USER01
Domain Controller Diag dcdiag
Check Translation Overview repadmin /replsummary
Check Translation times repadmin /showrepl
Replication with manulal repadmin /replicate SORCE DEST DC=xx,DC=xxx
repadmin /replicate tyo-ad-01 hk-ad-01 DC=example,DC=local


Operation Command
Display user dsquery user
dsquery user -limit 1000
dsquery user ou=Tokyo,dc=example,dc=local
dsquery user -disabled
Display Computer dsquery computer dc=example,dc=local
dsquery computer -name PC*
Display Group dsquery group dc=example,dc=local
Display OU dsquery ou ou=Tokyo,dc=example,dc=local
Display Domain Controller dsquery server
C:\> rundll32.exe dsquery.dll,OpenQueryWindow

Proxy settings of Office authentication and Windows Update

netsh winhttp show proxy Check the current setting status
netsh winhttp reset proxy Direct access
netsh winhttp import proxy source=ie Use the same settings as Internet Explorer
netsh winttp set proxy proxy-server=“x.x.x.x:8080”
netsh winhttp set proxy proxy-server="myProxyServer:8080" bypass-list="<local>;*;*"

Additional Commands


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


I have developed cmdLauncher.
cmd Launcher is Input search type launcher
cmdLauncher is a useful launcher for Microsoft Windows.
You can easily access the software, file, folder you registerd.


os/windows/command/index.html.txt · Last modified: 2021/03/08 by admin

Page Tools