From 31e13d4de11c5f2f5b777e8d699dc784428af28c Mon Sep 17 00:00:00 2001 From: Alex Kup <116945542+Lifailon@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:14:45 +0300 Subject: [PATCH] Delete Scripts/Get-ProcessDescription.psm1 --- Scripts/Get-ProcessDescription.psm1 | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 Scripts/Get-ProcessDescription.psm1 diff --git a/Scripts/Get-ProcessDescription.psm1 b/Scripts/Get-ProcessDescription.psm1 deleted file mode 100644 index 3931a43..0000000 --- a/Scripts/Get-ProcessDescription.psm1 +++ /dev/null @@ -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 \ No newline at end of file