网络浪子 发表于 2018-9-2 12:32:46

Powershell 获取进程

  $args="localhost","loopback","127.0.0.1"
  foreach($i in $args)
  {
  $strFile="c:\"+$i+"process.txt"
  Write-Host "Testing" $i "Please wait...."
  Get-WmiObject -ComputerName $i -Class win32_process | Select-Object                         name,processid,priority,ThreadCount,pageFaults,pagefileusage|
  Where-Object {!$_.processid -eq 0} | Sort-Object -Property name | Format-Table |             Out- File $strFile
  }

页: [1]
查看完整版本: Powershell 获取进程