title: powershell load function in a script file before executing everything else
body: <p>I'm learning power shell and stuck with the problem</p>
  
  <p>I have test.ps1:</p>
  
  <pre>
  Test
  
  Function Test 
  {
     $a="a"
  }
  </pre>
  
  <p>when I execute it from commandline:</p>
  
  <pre> PS > .\test.ps1 </pre>
  
  <p>I get an error</p>
  
  <pre>The term 'Test' is not recognized as the name of a cmdlet, function,</pre>
  
  <p>but when I move call to the Test function after the declaration of the function, it works fine.</p>
  
  <p>Is there a way to load all the functions from the script before the execution of the script? 
  It would be nice to keep the functions in the same file, after the main body of the script.</p>