title: Get Powershell to wait for an SQL command to execute
body: <p>Here's my code (or a portion of it anyway...)</p>
  
  <pre><code>    $SQLCommand.CommandText=$CmdString
      $SQLCommand.CommandType=1
      $SQLCommand.Connection=$sqlConnection
      #CLear errors before we try to execute.. 
      $Error.Clear()
      **$SQLCommand.NonQuery()**
  </code></pre>
  
  <p>I want the ExecuteNonQuery to wait till it's finished.  So far, no luck finding an answer, and of course the clock is running.. aarrrrgh!</p>
  
  <p>Thanks...</p>