1.查看所有进程详情
wmic process get caption,commandline /value
2.列举当前的进程、进程路径、命令行、进程ID、父进程ID、线程数,内存使用
wmic process get name,executablepath,commandline,processid,parentprocessid,threadcount,workingsetsize/value
3. 根据执行的文件查看,如java.exe
的所属的进程
wmic process where caption="java.exe" get processid,caption,commandline /value
4.根据cmd命令查询进程
wmic process where CommandLine="java -jar demo.jar" get processid /value
5.杀死进程
taskkill /F /PID {PID}
评论区