windows命令笔记

记录常用的一些命令

wmi TIPS

1. wmic list 用法

wmic process list brief

brief 摘要 full 详细

Description 进程名 Name 进程名 ExecutablePath 路径 CommandLine 执行命令 ProcessId 进程id

2. 如查询某进程信息

wmic process where Name="python.exe" get ProcessId,name,commandline

3. 查询某进程 排除

wmic process where "((commandline like '%_nslookup_%') AND NOT (commandline like '%_wmic_%'))" get commandline

4.获取进程一秒刷新一次

wmic process where Name="feiq.exe" get ProcessId,name,commandline  /every:1
wmic process where "((name ='php.exe')  AND NOT (commandline like '%_wmic_%'))" get  ProcessId,name,commandline /every:1

5.列出开机启动项

wmic startup list brief