开发者

Get process ID from Com Object

开发者 https://www.devze.com 2023-01-27 05:23 出处:网络
It is possible to get the Process ID from this new Com Object ($ie) ? $ie=New-Object -comobject InternetExplorer.Application

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.stackove开发者_Go百科rflow.com")


The following will give you the parent IE process:

(Get-Process -Name iexplore)| Where-Object {$_.MainWindowHandle -eq $ie.HWND}
0

精彩评论

暂无评论...
验证码 换一张
取 消