title: InternetExplorer.Application COM object's getElementById method not working
body: <p>I am very new to powershell, and I am trying to automate a login to website, I have browsed many examples but NONE is working without errors.</p>
  
  <p>For example with this very simple script:</p>
  
  <pre><code>$ie = New-Object -comobject InternetExplorer.Application
  $ie.Visible = $true
  $ie.Navigate($URL)
  $ie.Navigate("www.facebook.com")
  $ie.document.getElementById("pass")
  $ie.document.getElementById("pass").value = "Hi"
  </code></pre>
  
  <p>I am supposed to get "Hi" in the password field but I get instead this</p>
  
  <p><img src="https://i.stack.imgur.com/b8kqk.png" alt="Screenshot here"></p>
  
  <p>I am getting this error in ALL the examples I found, what's going on? Is this something no longer supported in Powershell?</p>
  
  <p>I have windows 10.</p>