문제

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")
도움이 되었습니까?

해결책

The following will give you the parent IE process:

(Get-Process -Name iexplore)| Where-Object {$_.MainWindowHandle -eq $ie.HWND}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top