title: Powershell IE Automation FireEvent not triggering
body: <p>So here is my dilemma. This is a part of the code:</p>
  
  <pre><code>$ie.Document.getElementById("ctl00_ContentPlaceHolder1_ctl11_SSLControl_ddlIndustry").SelectedIndex = "6"
  $ie.Document.getElementById("ctl00_ContentPlaceHolder1_ctl11_SSLControl_ddlIndustry").FireEvent("onchange")
  </code></pre>
  
  <p>When I run this as part of a script the FireEvent doesn't trigger. I get the return value True, but the action does not work. If I copy and paste each line in Powershell manually, the FireEvent works. </p>
  
  <p>What I think is that Powershell is not waiting for the firevent to finish triggering and is already going to the next line. </p>
  
  <p>My question, how can I tell powershell to wait for the entire command to finish or some other alternative.</p>
  
  <p>Thanks in advance!</p>