title: "Method Not found" error when calling GetElementsbyClassName
body: <p>I created a PowerShell automation script and I gave it to my friend when he run it, it said</p>
  
  <pre>Method invocation failed because [mshtml.HTMLBodyClass] does not contain a method
  named 'getElementsByClassName'.
  At C:\Users\עמית\Documents\asaf.ps1:22 char:3
  +   $a=$docs.body.getElementsByClassName("FadeOut-Scroll")
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : MethodNotFound</pre>
  
  <p>why is that happened?</p>
  
  <p>We both have IE11, .net 4.5, Visual studio, but I have that function and he not.</p>
  
  <p>And it looks like here in his computer the IE console have the function:</p>
  
  <p><a href="https://i.stack.imgur.com/fi9rW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fi9rW.png" alt="enter image description here"></a></p>
  
  <p>but PowerShell does not:</p>
  
  <p><a href="https://i.stack.imgur.com/iegpQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iegpQ.png" alt="enter image description here"></a></p>
  
  <p>How to update PowerShell?</p>