Last active
September 6, 2018 19:19
-
-
Save sathed/359c10bed262cfb2f227786f5d6ea255 to your computer and use it in GitHub Desktop.
Get the state of a Windows process.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Using Notepad as an example. | |
$target = "notepad" | |
#Get the process | |
$process = Get-Process -Name $target -ErrorAction SilentlyContinue | |
#Get the execution state of the thread. | |
$threads=$process.Threads | |
$threads | select Id,ThreadState,WaitReason |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment