How to check if a process is runnin using PowerShell

Configurare noua (How To)

Situatie

How to check if a process is runnin using a PowerShell script

Solutie

 

$calculator = Get-Process calc -ErrorAction SilentlyContinue
if ($calculator) {echo “running”}else{echo “not running”}
Remove-Variable calculator

Tip solutie

Permanent

Voteaza

(9 din 21 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?