title: Use InsertAdjacentHtml by Powershell with IE COM
body: <p>I am trying to use  InsertAdjacentHtml with IE COM by Powershell but my code fails what can be the reason ? </p>
  
  <pre><code>$oIE = new-object -ComObject InternetExplorer.Application
  $oIE.visible=$True
  $oIE.navigate2("http://www.quirksmode.org/dom/core/getElementsByName.html")
  While ($ie.Busy) {
  Sleep 2
  }
  $doc = $oIE.Document
  $btns = $doc.getElementsByTagName("input")
  $btns.insertAdjacentHTML('afterend', '&lt;div id="secondDiv"&gt;Second&lt;/div&gt;');
  
  $oIE.visible=$True
  </code></pre>
  
  <p>The comand line shows Invalid Operation error</p>