meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
windows:commandline:start [2026/06/09 13:33] titannetwindows:commandline:start [2026/06/11 15:41] (current) titannet
Line 3: Line 3:
 ===== Process Information ===== ===== Process Information =====
  
-List all processes currently running: +^  ^^  ^ 
-C:\> tasklist +| ''tasklist'' || List all processes currently running  
-List all processes currently running and the DLLs +| ''tasklist /m'' || List all processes currently running and the DLLs each has loaded | 
-each has loaded: +| ''tasklist /m [dll]'' || Lists all processes currently running which have the specified [dll] loaded | 
-C:\> tasklist /m +| ''tasklist /svc'' || List all processes currently running and the services hosted in those processes | 
-Lists all processes currently running which have the +| ''sc query'' || Query brief status of all services | 
-specified [dll] loaded: +| ''sc qc [ServiceName]'' || Query the configuration of a specific service | 
-C:\> tasklist /m [dll] +| ''taskkill <task>'' || | 
-List all processes currently running and the services + 
-hosted in those processes+===== File handling ===== 
-C:\> tasklist /svc + 
-Query brief status of all services: +^  ^^  ^ 
-C:\> sc query +| ''dir'' ||  | 
-Query the configuration of a specific service: +| ''copy'' ||  | 
-C:\sc qc [ServiceName]+| ''move'' ||  | 
 +| ''del'' ||  | 
 +| ''type'' ||  | 
 +| ''more'' ||  | 
 +| ''fc'' || compare two files | 
 +| ''echo'' ||  | 
 +| ''md, cd, rd/rmdir'' || directories | 
 +| ''xcopy, robocopy'' || copy file trees (or other complex copy operations) | 
 +|  ||  | 
  
 ===== File search ===== ===== File search =====
  
-Search directory structure for a file in a specific +^  ^^  ^ 
-directory: +| ''dir /b /s [Directory]\[FileName]'' || Search directory structure for a file in a specific directory | 
-C:\> dir /b /s [Directory]\[FileName] +| ''[Command] %%|%% find <string>'' || Find <string> in command output 
-Count the number of lines on StandardOuy of +| ''[Command] %%|%% find /c <string>'' || Count <string> in command output 
-[Command]+''find /c /v ""'' || Finds the count (/c) of lines that do not contain (/v) nothing (""). Lines that do not have nothing are all lines, even blank lines, which contain CR/LF 
-C:\> [Command] | find /c /v "" +|  ||  | 
-Finds the count (/c) of lines that do not contain (/v) + 
-nothing (""). Lines that do not have nothing are all +
-lines, even blank lines, which contain CR/LF+
  
 ===== Loops ===== ===== Loops =====
  
-Counting Loop: +^  ^^  ^ 
-C:\> for /L %i in +| ''for /L %i in ([start],[step],[stop]) do [command]'' || Counting Loop | 
-([start],[step],[stop]) do [command]+| ''for /F %i in ([file-set]) do [command]'' || Iterate over file line by line | 
 +|  ||  | 
 + 
 +===== System Info =====
  
-Iterate over file line by line: 
-C:\> for /F %i in ([file-set]) do 
-[command] 
  
 +<code>
 +DATE Outputs or sets the current date DATE
 +TIME Displays or sets the system time TIME
 +DRIVERQUERY Displays the current state and properties of device drivers DRIVERQUERY
 +HOSTNAME Displays the name of the computer HOSTNAME
 +SYSTEMINFO Shows configuration information about your computer SYSTEMINFO
 +VER Displays the Windows version VER
 +GPRESULT Displays the currently applied group policies (RSoP) GPRESULT /R
 +GPUPDATE Updates group policies GPUPDATE /FORCE
 +</code>
  
 ===== Tools ===== ===== Tools =====
  
-==== Netstat ====+==== Network ====
  
-Useful Netstat Syntax +^  ^^  ^ 
-Show all TCP and UDP port usage and process ID: +| ''%%netstat –nao%%'' || Show all TCP and UDP port usage and process ID | 
-C:\> netstat –nao +| ''%%netstat –nao [N] | find [port]%%'' || Look for usage of port [port] every [N] seconds | 
-Look for usage of port [port] every [N] seconds+| ''%%netstat –s –p [tcp|udp|ip|icmp]%%'' || Dump detailed protocol statistics | 
-C:\> netstat –nao [N] find [port] +|  ||  |
-Dump detailed protocol statistics: +
-C:\> netstat –s –p [tcp|udp|ip|icmp]+
  
 +
 +<code>
 +PCONFIG Shows information about network interfaces and IP configuration IPCONFIG /ALL
 +PING Sends ICMP requests to the target host to check its availability PING google.com
 +TRACERT Finds the network path for packets traveling to a destination TRACERT google.com
 +NSLOOKUP Finds the IP address for a resource name NSLOOKUP google.com
 +ROUTE Displays network route tables ROUTE PRINT
 +ARP Displays a table mapping IP addresses to physical (MAC) addresses ARP -A
 +NETSH Starts the network settings control program NETSH INTERFACE IP SHOW CONFIG
 +
 +</code>
  
 ==== Reg ==== ==== Reg ====
  
 +
 +^  ^^  ^
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
  
 reg add reg add
Line 73: Line 112:
  
 ==== wmic ==== ==== wmic ====
 +
 +^  ^^  ^
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
  
 wmic [alias] [where clause] [verb wmic [alias] [where clause] [verb
Line 111: Line 162:
  
 ==== Netsh ==== ==== Netsh ====
 +
 +^  ^^  ^
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
  
 Interacting with the Network Using Netsh Interacting with the Network Using Netsh
Line 126: Line 189:
 C:\> netsh interface ip set address C:\> netsh interface ip set address
 local dhcp local dhcp
 +
 +
 +==== Administration ====
 +
 +^  ^^  ^
 +|''schtasks /CREATE /SC DAILY /TN "Backup" /TR "C:\Backup.bat" /ST 12:00''  || Schedule task |
 +|''schtasks'' || List scheduled tasks |
 +|''shutdown -s -t 0'' || shutdown now (time in sec 0) |
 +|''runas /USER:Administrator "notepad.exe"'' || You guess! |
 +|  ||  |
 +|  ||  |
 +
 +
  
  
 ==== GUI ==== ==== GUI ====
 +
 +^  ^^  ^
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
  
 Invoking Useful GUIs at the Command Line Invoking Useful GUIs at the Command Line
Line 143: Line 231:
 Control Panel: Control Panel:
 C:\> control C:\> control
 +
 +
 +==== Template ====
 +
 +
 +^  ^^  ^
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +|  ||  |
 +
 +