title: Understanding ON ERROR in VBScript
body: <p>I am trying to modify a vbscript and convert it to Powershell as instructed. I have a block of code on my function SearchAD with On Error.</p>
  
  <pre><code>on error resume next
  Set objRS = command.execute
  
  SearchAD = objRS.RecordCount
  on error goto 0
  </code></pre>
  
  <p>My question would be is what part of the code can trigger RESUME Next and what part is for GOTO 0.</p>