Question

It is possible to get the Process ID from this new Com Object ($ie) ?

$ie=New-Object -comobject InternetExplorer.Application  
$ie.visible=$true  
$ie.Navigate("www.stackoverflow.com")
Was it helpful?

Solution

The following will give you the parent IE process:

(Get-Process -Name iexplore)| Where-Object {$_.MainWindowHandle -eq $ie.HWND}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top