An Interest In:
Web News this Week
- March 22, 2024
- March 21, 2024
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
March 24, 2022 01:56 am GMT
Original Link: https://dev.to/redhcp/memory-process-view-powershell-30k4
Memory Process View Powershell
Get Memory usage in Percentage
$CompObject = Get-WmiObject -Class WIN32_OperatingSystem$Memory = ((($CompObject.TotalVisibleMemorySize - $CompObject.FreePhysicalMemory)*100)/ $CompObject.TotalVisibleMemorySize)Write-Host "Memory usage in Percentage: " ([math]::round($Memory,2))"%"
Top 5 process Memory Usage (MB)
$processMemoryUsage = Get-WmiObject WIN32_PROCESS | Sort-Object -Property ws -Descending | Select-Object -first 10 processname, @{Name="Mem Usage(MB)";Expression={[math]::round($_.ws / 1mb)}}$processMemoryUsage
Original Link: https://dev.to/redhcp/memory-process-view-powershell-30k4
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To