Powershell Get-Process and Task Manager discrepancy

Solution 1:

Ok, just realized what was happening. The dafault "Memory" column in Task Manager is actually representing the Private Working Set, not Working Set from Powershell, that represents private and shared memory with other process. Just enabled the "Memory - Working Set" column in Task Manager and it matches.

Task Manager

Obviously the values in Powershell are in bytes, need to calculate to Mb.

This page was also helpful:

http://windows.microsoft.com/en-us/windows/what-task-manager-memory-columns-mean#1TC=windows-7

Solution 2:

The (Shared) Working Set and the Private Working Set are two different things.

More info A few words on memory usage or: working set vs. private working set.

To get the Private Working Set via Get-Process in PowerShell you can use "PrivateMemorySize":

Get-process | Sort PrivateMemorySize -Descending | Select Name,PrivateMemorySize -First 10