internet explorer - Open tab in existing IE instance -


$ie = new-object -com internetexplorer.application 

everytime open new website object(ie every time when script runs) opened in new ie window , don't want that. want opened in new tab in opened ie window. want reuse object when script runs next time. don't want create new object

so there way check instances of internet explorer , reuse instance ???

i tried solution:

first have attach running internet explorer instance:

$ie = (new-object -com "shell.application").windows() `     | ? { $_.name -eq "windows internet explorer" } 

then navigate new url. url opened controlled via flags parameter:

$ie.navigate("http://www.google.com/", 2048) 

but not able call navigate method on newly created object $ie.

you can use start-process open url. if browser window open, open tab.

start-process 'http://www.microsoft.com' 

Comments