0

$ie = New-Object -com internetexplorer.application

i want to reuse this object when the script runs next time. I don't want to create a new object

2
  • How script is executed? Scheduled task? execute from same powershell console by hand? Commented Mar 21, 2013 at 9:09
  • What happens if your script terminates abnormally, or some other process on the system terminates your instance of IE? Commented Mar 21, 2013 at 12:31

1 Answer 1

1

You should be able to attach to the process with this, check the result of the Windows() method, locate the IE one and then build the correct where clause:

$ie = (New-Object -ComObject Shell.Application).Windows() | Where-Object {...}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.