C:\WINDOWS>TASKKILL /?
TASKKILL
[/S system
[/U username
[/P
[password
]]]] {
[/FI filter
] [/PID processid | /IM imagename
] }
[/F
] [/T
]描述:
这个命令行工具可用来结束至少一个进程。
可以根据进程 id 或图像名来结束进程。
参数列表:
/S system 指定要连接到的远程系统。
/U
[domain\
]user 指定应该在哪个用户上下文
执行这个命令。
/P
[password
] 为提供的用户上下文指定
密码。如果忽略,提示输入。
/F 指定要强行终止
进程。
/FI filter 指定筛选进或筛选出查询的
的任务。
/PID process id 指定要终止的进程的
PID。
/IM image name 指定要终止的进程的
图像名。通配符 '*'
可用来指定所有图像名。
/T Tree kill: 终止指定的进程
和任何由此启动的子进程。
/? 显示帮助/用法。
筛选器:
筛选器名 有效运算符 有效值
----------- --------------- --------------
STATUS eq, ne 运行 | 没有响应
IMAGENAME eq, ne 图像名
PID eq, ne, gt, lt, ge, le PID 值
SESSION eq, ne, gt, lt, ge, le 会话编号
CPUTIME eq, ne, gt, lt, ge, le CPU 时间,格式为
hh:mm:ss。
hh - 时,
mm - 钟,ss - 秒
MEMUSAGE eq, ne, gt, lt, ge, le 内存使用,单位为 KB
USERNAME eq, ne 用户名,格式为
[domain\
]user
MODULES eq, ne DLL 名
SERVICES eq, ne 服务名
WINDOWTITLE eq, ne 窗口标题
注意: 只有带有筛选器的情况下,才能跟 /IM 切换使用通配符 '*'。
注意: 远程进程总是要强行终止,
不管是否指定了 /F 选项。
例如:
TASKKILL /S system /F /IM notepad.exe /T
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
TASKKILL /F /IM notepad.exe /IM mspaint.exe
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"
EXAMPLE
Kill Procesid
D:\SoftwareOK>tasklist
Abbildname PID Sitzungsname Sitz.-Nr. Speichernutzung
========================= ===== ================ ========== ===============
System Idle Process 0 Console 0 28 K
System 4 Console 0 240 K
SMSS.EXE 656 Console 0 388 K
CSRSS.EXE 708 Console 0 5.024 K
WINLOGON.EXE 732 Console 0 1.568 K
SERVICES.EXE 776 Console 0 3.420 K
LSASS.EXE 788 Console 0 1.532 K
SVCHOST.EXE 960 Console 0 4.928 K
SVCHOST.EXE 1036 Console 0 4.392 K
SVCHOST.EXE 1156 Console 0 23.528 K
SVCHOST.EXE 1248 Console 0 3.600 K
SVCHOST.EXE 1312 Console 0 7.372 K
LEXBCES.EXE 1484 Console 0 3.608 K
LEXPPS.EXE 1520 Console 0 3.436 K
SPOOLSV.EXE 1528 Console 0 6.236 K
EXPLORER.EXE 1892 Console 0 36.376 K
LXCZBMGR.EXE 192 Console 0 2.600 K
CTFMON.EXE 216 Console 0 3.884 K
LXCZBMON.EXE 228 Console 0 2.316 K
MagicDisc.exe 524 Console 0 1.240 K
INETINFO.EXE 1412 Console 0 9.680 K
NVSVC32.EXE 1436 Console 0 3.792 K
SVCHOST.EXE 1772 Console 0 4.812 K
ALG.EXE 2708 Console 0 3.632 K
SVCHOST.EXE 3224 Console 0 3.504 K
IEXPLORE.EXE 1804 Console 0 45.884 K
Ped3.exe 436 Console 0 24.376 K
IEXPLORE.EXE 300 Console 0 48.352 K
IEXPLORE.EXE 3276 Console 0 42.144 K
MSDEV.EXE 3860 Console 0 15.392 K
IEXPLORE.EXE 3736 Console 0 23.868 K
IEXPLORE.EXE 1760 Console 0 23.724 K
MSIMN.EXE 4080 Console 0 20.560 K
IEXPLORE.EXE 2624 Console 0 27.380 K
WMIPRVSE.EXE 3484 Console 0 5.988 K
ColorConsole.exe 2292 Console 0 3.096 K
cmd.exe 2232 Console 0 2.708 K
tasklist.exe 3084 Console 0 4.524 K
Kill the process with PID 2292
D:\SoftwareOK>taskkill /pid 2292
Kill the process with PID 2292 + PID 2232
D:\SoftwareOK>taskkill /pid 2292 /pid 2232
taskkill /pid 1230 /pid 1241 /pid 1253
taskkill /f /fi "USERNAME eq NT AUTHORITY\SYSTEM" /im notepad.exe
Kill notepad.exe
D:\SoftwareOK>taskkill /IM notepad.exe /F
kill notepad.exe on network pc "pc4"
D:\SoftwareOK>taskkill /s pc4 /f /im notepad.exe
C:\WINDOWS>TASKLIST /?
TASKLIST
[/S system
[/U username
[/P
[password
]]]] [/M
[module
] | /SVC | /V
] [/FI filter
] [/FO format
] [/NH
]描述:
这个命令行工具显示应用程序和本地
或远程系统上运行的相关任务/进程的
列表。
参数列表:
/S system 指定连接到的远程系统。
/U
[domain\
]user 指定应该在哪个用户上下文
执行这个命令。
/P
[password
] 为提供的用户上下文指定
密码。如果忽略,提示输入。
/M
[module
] 列出所有其中符合指定模式名
的 DLL 模块的所有任务。
如果没有指定模块名,则
显示每个任务加载的所有模块。
/SVC 显示每个进程中的服务。
/V 指定要显示详述
信息。
/FI filter 显示一系列符合筛选器指定的标准
的任务。
/FO format 指定输出格式。
有效值: "TABLE"、"LIST"、"CSV"。
/NH 指定栏标头不应该在
输出中显示。
只对 "TABLE" 和 "CSV" 格式有效。
/? 显示帮助/用法。
筛选器:
筛选器名 有效操作符 有效值
----------- --------------- --------------
STATUS eq, ne 正在运行 | 没有响应
IMAGENAME eq, ne 图像名
PID eq, ne, gt, lt, ge, le PID 值
SESSION eq, ne, gt, lt, ge, le 会话编号
SESSIONNAME eq, ne 会话名
CPUTIME eq, ne, gt, lt, ge, le CPU 时间,格式为
hh:mm:ss。
hh - 时,
mm - 分,ss - 秒
MEMUSAGE eq, ne, gt, lt, ge, le 内存使用量(KB)
USERNAME eq, ne 用户名,格式为
[domain\
]user
SERVICES eq, ne 服务名
WINDOWTITLE eq, ne 窗口标题
MODULES eq, ne DLL 名
例如:
TASKLIST
TASKLIST /M
TASKLIST /V
TASKLIST /SVC
TASKLIST /M wbem*
TASKLIST /S system /FO LIST
TASKLIST /S system /U domain\username /FO CSV /NH
TASKLIST /S system /U username /P password /FO TABLE /NH
TASKLIST /FI "USERNAME ne NT AUTHORITY\SYSTEM" /FI "STATUS eq
running"
C:\WINDOWS>TFTP /?
Transfers files to and from a remote computer running the TFTP service.
TFTP
[-i
] host
[GET | PUT
] source
[destination
] -i Specifies binary image transfer mode (also called
octet). In binary image mode the file is moved
literally, byte by byte. Use this mode when
transferring binary files.
host Specifies the local or remote host.
GET Transfers the file destination on the remote host to
the file source on the local host.
PUT Transfers the file source on the local host to
the file destination on the remote host.
source Specifies the file to transfer.
destination Specifies where to transfer the file.