Author Posts

April 18, 2018 at 7:26 am

$h = @{}
get-wmiobject win32_process | foreach {
$u = $_.getowner().user;
if ( $u -ne $null)
{
if ( !$h.ContainsKey($u) )
{
$h.add( $u, $_.PrivatePageCount);
}
else
{
$h.item($u) = $h.item($u) + $_.PrivatePageCount;
}
}
}
$h.GetEnumerator() | sort value -desc

April 18, 2018 at 7:30 am

8388608 / 1MB

or

16777216 / 1MB

April 18, 2018 at 7:42 am

where write that?
Because i don't know much, thank you

April 18, 2018 at 7:44 am

Where do you want the value converted to MB?

April 18, 2018 at 7:52 am

with getenumerator because the Value is a property

April 18, 2018 at 8:39 am

You could use a Select-Object with a calculated property

....  | Select-Object -Property Name,@{Name='Value';Expression={$_.Value / 1MB}}

April 18, 2018 at 8:52 am

Thank you. it works 😉
Great