≡ Menu

Get process details using window title:

I came across a incident where I have to kill one of the running MMC(active directory users and computers) as it is not responding properly. I went to task manager and tried killing the process but in vain. I am sure this happens for many of the system administrations and they had to go to the processes tab and find-out the process and kill it. I thought of doing that but I have few more other important MMCs running which I don’t want to disturb.  I looked around for a quick way to find out which MMC process belongs to my “Active Directory Users and Computers” MMC and resulted in this small and power{full | shell} script.
PS C:> Get-Process | where {$_.mainwindowtitle -match “active directory users and computers”}
And to stop/kill that process I used powershell only as it is straight forward from here.

PS C:> Get-Process | where {$_.mainwindowtitle -match “active directory users and computers”} | stop-process

I am done with my task 🙂
Happy Learning,
Sitaram Pamarthi