Powershell: how to check if any instance of internet explorer is already running -
i want check if instance of internet explorer, ie window of it, opened or not can decide new object has created or have attach existing process of ie window. code below:
$ie = (new-object -com "shell.application").windows()| ? { $_.name -eq "windows internet explorer" } i want attach windows() when window of ie opened , if no ie window opened line should this:
$ie = (new-object -com "shell.application")
try:
if ( get-process iexplore -ea silentlycontinue | where-object {$_.mainwindowtitle -ne ""} )
Comments
Post a Comment