Delete Scripts/Get-ProcessDescription.psm1
This commit is contained in:
parent
b709d7e96b
commit
31e13d4de1
1 changed files with 0 additions and 29 deletions
|
|
@ -1,29 +0,0 @@
|
|||
function Get-ProcessDescription {
|
||||
param (
|
||||
$ProcessName
|
||||
)
|
||||
if ($null -eq $ProcessName) {
|
||||
$GetProcess = Get-Process -ErrorAction Ignore
|
||||
}
|
||||
else {
|
||||
$GetProcess = Get-Process -Name $ProcessName -ErrorAction Ignore
|
||||
}
|
||||
if ($null -ne $GetProcess) {
|
||||
$GetProcess | Sort-Object -Descending CPU | Select-Object ProcessName,
|
||||
@{Name="TotalProcTime"; Expression={$_.TotalProcessorTime -replace "\.\d+$"}},
|
||||
@{Name="UserProcTime"; Expression={$_.UserProcessorTime -replace "\.\d+$"}},
|
||||
@{Name="PrivilegedProcTime"; Expression={$_.PrivilegedProcessorTime -replace "\.\d+$"}},
|
||||
@{Name="WorkingSet"; Expression={[string]([int]($_.WS / 1024kb))+" MB"}},
|
||||
@{Name="PeakWorkingSet"; Expression={[string]([int]($_.PeakWorkingSet / 1024kb))+" MB"}},
|
||||
@{Name="PageMemory"; Expression={[string]([int]($_.PM / 1024kb))+" MB"}},
|
||||
@{Name="VirtualMemory"; Expression={[string]([int]($_.VM / 1024kb))+" MB"}},
|
||||
@{Name="PrivateMemory"; Expression={[string]([int]($_.PrivateMemorySize / 1024kb))+" MB"}},
|
||||
@{Name="RunTime"; Expression={((Get-Date) - $_.StartTime) -replace "\.\d+$"}},
|
||||
@{Name="Threads"; Expression={$_.Threads.Count}},
|
||||
Handles,Path
|
||||
}
|
||||
}
|
||||
|
||||
# Get-ProcessDescription *
|
||||
# Get-ProcessDescription *torrent*
|
||||
# Get-ProcessDescription qbittorrent
|
||||
Loading…
Add table
Add a link
Reference in a new issue