title: Powershell Function Name as "main" Strange Effect
body: <p>Check out this code:</p>
  
  <pre><code>main
  
  function main
  {
      cls
      Write-Host "hi"
  }
  </code></pre>
  
  <p>If you run it for the first time, the windows Mouse Properties window will load.</p>
  
  <p>Run it again and it will display "hi".</p>
  
  <p>Why is this?</p>
  
  <p>I understand that main.cpl is the Mouse Properties window. But why is it that it opens only the first time, then the 2nd time Powershell realises that you actually want to call the "main" function.</p>
  
  <p>Shouldn't Powershell detect this and ask you to write main.cpl instead if you want the mouse properties window?</p>