title: Dot sourcing a file doesn't work
body: <p>Im following <a href="https://stackoverflow.com/questions/1864128/load-variables-from-another-powershell-script">this</a> question but I can't seem to get this working.</p>
  
  <p>(For the sake of testing) I have a powershell module with 2 scripts: variables.ps1 and function.ps1 and a manifest mymodule.psd1 (These files are all in the same directory)</p>
  
  <p>This is the content of variables.ps1:</p>
  
  <pre><code>$a = 1;
  $b = 2;
  </code></pre>
  
  <p>This is the content of function.ps1</p>
  
  <pre><code>. .\variables.ps1
  function myfunction
  {
      write-host $a
      write-host $b
  }
  </code></pre>
  
  <p>When I import the module and call myfunction. This is the output:</p>
  
  <pre><code>C:\&gt; Import-Module .\mymodule.psd1
  C:\&gt; myfunction
  . : The term '.\variables.ps1' is not recognized as the name of a cmdlet, function, script file, or operable
  program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
  At C:\Users\Jake\mymodule\function.ps.ps1:8 char:4
  +     . .\variables.ps1
  +       ~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (.\variables.ps1:String) [], ParentContainsErrorRecordException
      + FullyQualifiedErrorId : CommandNotFoundException
  </code></pre>
  
  <p>Why doesn't this work?</p>