Get PID of COM server
问题 I create a com object in powershell like so: $application = new-object -ComObject "word.application" Is there a way to get the PID (or some other unique identifier) of the launched MS Word instance? I want to check if the program is blocked e.g. by modal dialogs asking for passwords, and I can't do it from whithin PowerShell. 回答1: Ok, I found out how to do it, we need to call the Windows API. The trick is to get the HWND, which is exposed in Excel and Powerpoint, but not in Word. The only way