title: Load powershell script to be callable at any time
body: <p>I am new to powershell and was trying to use the example script posted <a href="http://www.windowsitpro.com/article/scripting/calculate-file-hashes-powershell-139518" rel="noreferrer">here</a> (the <a href="http://pastebin.com/AUQ5nT1C" rel="noreferrer">script itself</a>) to calculate a file hash. I can get it to work using dot notation</p>
  
  <pre><code>. 'E:\Tools\Power Shell Scripts\Get-FileHash.ps1' E:\testfile.bin
  </code></pre>
  
  <p>however I want to be able to use it like the author does and just type</p>
  
  <pre><code>Get-Filehash E:\testfile.bin
  </code></pre>
  
  <p>I have found I can do</p>
  
  <pre><code>function Get-FileHash {. 'E:\Tools\Power Shell Scripts\Get-FileHash.ps1'}
  </code></pre>
  
  <p>but that does not behave correctly, it prompts me for the file when I do <code>Get-Filehash E:\testfile.bin</code></p>
  
  <p>What do I need to put in my profile script to correctly load this script and <code>Get-Help Get-FileHash</code> works correctly?</p>