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]