Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
$top_procs = 5
$server = "MyServer"
gwmi -computer $server Win32_PerfFormattedData_PerfProc_Process | where {$_.name -NOTLIKE 'IDLE' -AND $_.name -NOTLIKE '_Total'} | sort PercentProcessorTime -desc | select Name,PercentProcessorTime | Select -First $top_procs | ft -auto
$owners = @{}
gwmi win32_process |% {$owners[$_.handle] = $_.getowner().user}
get-process | select processname,Id,@{l="Owner";e={$owners[$_.id.tostring()]}}
$top_procs = 5
$server = "MyServer"
$processes = gwmi -computer $server Win32_PerfFormattedData_PerfProc_Process | where {$_.name -NOTLIKE 'IDLE' -AND $_.name -NOTLIKE '_Total'} | sort PercentProcessorTime -desc | select Name,PercentProcessorTime,Owner,IDProcess,Handles | Select -First $top_procs
foreach ($process in $processes)
{
[string]$handles = (get-process -computername $server | where {$_.ID -eq $proc_id} | select handles)
$handles_start = $handles.IndexOf("=") + 1
$handles_end = $handles.length - 1
$handles = $handles.substring($handles_start,($handles_end-$handles_start))
$process.handles = $handles
[string]$owner = gwmi win32_process -ComputerName $server | where {$_.handles -eq $handles} | select {$_.getowner().user}
$owner_start = $owner.IndexOf("=") + 1
if ($owner_start -gt 1)
{
$owner_end = $owner.length - 1
$owner = $owner.substring($owner_start,($owner_end-$owner_start))
}
$process.owner = $owner
}
$processes | ft name,PercentProcessorTime,Owner,IDProcess -autosize