Get-Process cmdlet returns every process that is running and then control returns to powershell. For example, running this in powershell, i get:
PS C:\Users\me> Get-Process -Name thunderbird
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
1791 139 193596 186964 551.86 13552 1 thunderbird
723 45 194640 198084 4.81 16772 1 thunderbird
1012 68 45068 41648 0.78 18328 1 thunderbird
PS C:\Users\me>
Is there a way to keep it running and update when another thunderbird process starts?
add it to the infinite loop
as following:
do{
get-process
start-sleep 5}
while(1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With