Search on an Internet Explorer App Object Search on an Internet Explorer App Object powershell powershell

Search on an Internet Explorer App Object


It sounds like the dialog box is a form within the same IE instance. It would be a document element.

$ie.document.documentelement.all | foreach {$DE = $_ ; $DE | where {$_.innerhtml -match "My search arguement"}| foreach{$DE|select uniqueID}}

Once you identify the uniqueID then you can use $ie.Document.getElementById('ms__id14')


It's a long shot but since it is in a company intranet, many times is can be a dialog telling you that you have SSL Certificate Error. It may be visible or not based on (wrongly?) enforced policies on your machine by the company. You might try to bypass it using this after navigating to the problematic URL:

    if ($ie.document.url -Match "invalidcert") {        $bypass_link = $ie.Document.getElementsByTagName("a") | where-object {$_.id -eq "overridelink"}        $bypass_link.click()        while ($ie.ReadyState -ne 4) {            start-sleep -m 100        }        "Done!"    };