powershell 获取进程ID

$strProcess="system"

Get-Process | 

foreach($_.name) {if($_.name -eq $strProcess){Write-Host "$strProcess process is id :"$_.ID}}


你可能感兴趣的:(System,process)