title: How do I make Powershell wait until a command is done before continuing?
body: <p>My script uninstalls a Windows Store app before installing the newer version. I need to make sure the uninstall is finished before installing, so how can I make sure I've waited long enough?</p>
  
  <pre class="lang-powershell prettyprint-override"><code>Remove-Appxpackage MyAppName  
  # ~wait here~  
  Add-Appxpackage .\PathToNewVersion
  </code></pre>