title: What is the difference between dot (.) and ampersand (&) in PowerShell?
body: <p>In PowerShell, what is the difference between using dot (<code>.</code>) and ampersand (<code>&amp;</code>) when invoking a cmdlet, function, script file, or operable program?</p>
  
  <p>For example:</p>
  
  <pre><code>. foo.sh1
  &amp; foo.sh1
  </code></pre>
  
  <hr>
  
  <p>There is a very similar question which has been incorrectly closed as a duplicate: <a href="https://stackoverflow.com/questions/43331465/differences-between-ampersand-and-dot-while-invoking-a-powershell-script">Differences between ampersand (&amp;) and dot (.) while invoking a PowerShell scriptblock</a>. The questions are different and have completely different keywords and search rankings. The answer on <a href="https://stackoverflow.com/questions/30855549/what-is-the-shorthand-for-in-powershell-pipeline">What is the `.` shorthand for in a PowerShell pipeline?</a> only answers half the question.</p>