‎02-18-2020 09:05 PM - last edited on ‎04-01-2024 04:35 PM by Mercedes_O
I needed a quick way to get the top 10 Memory Hogs on a PC. This Command will open up Powershell on your computer and show you the top 10 Memory Hogs on the Remote PC. It pauses at the end to keep the Window Open.
powershell.exe Invoke-Command -ComputerName {smartname} {Get-Process |Sort-Object -Descending WorkingSet |Select-Object -first 10 Name,ID,@{Name='WorkingSet';Expression={[math]::Round($_.WorkingSet/1KB,2)}} |FT Name,@{L='PID';E={$_.id}},@{L='Memory';E={$_.workingset}};Pause}
‎02-21-2020 03:00 PM
‎02-19-2020 09:54 PM
cmd.exe /K powershell.exe "echo '{smartname}';Invoke-Command -ComputerName {smartname} {Get-Process |Sort-Object -Descending WorkingSet |Select-Object -first 10 Name,ID,@{Name='WorkingSet';Expression={[math]::Round($_.WorkingSet/1KB,2)}} |FT Name,@{L='PID';E={$_.id}},@{L='Memory';E={$_.workingset}}}"
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now