Getting Process Based On Window Title

by Sep 23, 2009

It isn't always easy to pick the right process because the process ID or process name may not be known or ambiguous. If the process has a window and you can see the window title, all you need to do is search for a keyword in that window title. For example, as I am writing the new batch of tips, I could use a one-liner like this if I wanted to identify the instance of WinWord I am using:

Get-Process | Where-Object { $_.MainWindowTitle -like '*tip*' }

Of course, this would require that I saved my document with a title that contains the keyword. Replace the keyword with "Microsoft Word" to find all running instances of WinWord.

Twitter This Tip! ReTweet this Tip!