Answer the question
In order to leave comments, you need to log in
How to get a running powershell process?
I'm trying to find out if the 1cv8.exe process is running for the current user through powershell.
GetProcess | Where-Object {($_.SI -eq (Get-Process -PID $PID).SessionId) -and ($_.ProcessName -eq '1cv8')}
Answer the question
In order to leave comments, you need to log in
To get started, simplify to
Get-Process | Where-Object {$_.ProcessName -eq '1cv8'}
(Get-Process -PID $PID).SessionId
Get-Process | Where-Object {$_.ProcessName -eq '1cv8'} | select si,sessionid
$si = (Get-Process -PID $PID).SessionId; Get-Process | Where-Object {($_.SI -eq $si) -and ($_.ProcessName -eq '1cv8')}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question