| 用途 | 查看进程完整启动参数 |
|---|---|
| 语法 | Get-CimInstance Win32_Process -Filter "ProcessId=N" | Select-Object CommandLine |
| 批量 | Where-Object CommandLine -like '*关键字*' |
常用示例
常用示例
Get-CimInstance Win32_Process -Filter "Name='java.exe'" | Select-Object ProcessId, CommandLine
Get-CimInstance Win32_Process | Where-Object CommandLine -like '*--server.port*' | Select-Object ProcessId, CommandLine排查“哪个实例占用了端口”时,命令行参数往往直接给出答案。