IE ComObject loses reference, when navigating to Enterprise Mode site. RRS feed

  • Question

  • Hello.

    I have a problem with this simple task, create IE comObject, then navigate to Enterprise Mode enabled site. This throws reference of comObject off the board. New iexplore.exe *32 gets created, and now i have no access to originated comObject.

    How do I keep comObject associated, or updated to new instantiation of iexplore process?

    trying to automate tasks, becomes difficult when loosing access to comObject.

    Script used:

    $url = 'http://URL-To-EnterpriseMode-Site'
    $ie = new-object -ComObject "InternetExplorer.Application"
    $ie.visible = $true
    $ie.silent = $true
    $ie.navigate($url) # OR $ie.navigate2($url)
    while($ie.busy) { start-sleep -seconds 1 }

    Now $ie is emptied of reference to object.


    Mark Henriksen 

    Friday, August 31, 2018 8:41 AM