PowerShell: Prompt Function to Monitor Memory Usage

Have you ever wanted to monitor your memory utilization in a PowerShell instance, but may not want to continually issue commands to determine it? Introducing …… the PowerShell Prompt to monitor memory utilization!! function prompt { "$(‘{0:n2}’ -f ([double](Get-Process -Id $pid).WorkingSet/1MB)) MB> " } Here’s the result: