Hello, PW newbie here. I’m running this code which works fine:
Get-Process | Where-Object {$_.name -notlike ‘powershell’ -or ‘pwsh*’} | Sort-Object -Property vm -Descending | Select-Object -First 10 | Measure-Object vm -sum
However, I’m trying to display the sum in MB so I’ve tried running the following which doesn’t work:
Get-Process | Where-Object {$.name -notlike ‘powershell’ -or ‘pwsh*’} | Sort-Object -Property vm -Descending | Select-Object -First 10 | Measure-Object -Property vm -sum {$.sum/1mb}