PowerShell: Prompt Function to Monitor Memory Usage
Posted by Trevor Sullivan on 2012/01/23
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:
Episode 174 – Matt Graeber using PowerShell in Infosec « PowerScripting Podcast said
[…] Monitor Memory usage from your PowerShell prompt […]