title: Calling functions from Process blocks
body: <p>I would like to call a particular function from within both the Process and End blocks in my PowerShell script. Here is the minimal code:</p>
  
  <pre><code># MyScript.ps1
  
  function MyFunc
  {
      "hello"
  }
  
  Begin 
  {
  }
  
  Process 
  {
      MyFunc
  }
  
  End 
  {
      MyFunc
  }
  </code></pre>
  
  <p>This code however does not execute. I get this error:</p>
  
  <blockquote>
    <p>Begin : The term 'Begin' is not recognized as the name of a cmdlet,
    function, script file, or operable program.</p>
  </blockquote>