title: How to create a Hardlink using the New-Hardlink PowerShell PSCX command
body: <p>I want to create a new Hardlink with the PowerShell Community Extensions PSCX commandlet New-Hardlink <a href="http://pscx.codeplex.com/" rel="nofollow noreferrer">http://pscx.codeplex.com/</a>. I have read the man file and tried almost every combination of commands but it won't work.  What am I missing? (I know about fsutil, but I want to use this commandlet/alias)</p>
  
  <p>Here is the directory structure:
  E:\Source
  E:\Test</p>
  
  <p>Here are some variations of the command that I have tried:</p>
  
  <pre><code>New-Hardlink E:\Test\Source E:\Source
  New-Hardlink -Path:"E:\Test\Source" -Target:"E:\Source"
  New-Hardlink E:\Source E:\Test\Source
  New-Hardlink E:\Source E:\Test\
  New-Hardlink -P:"E:\Source" -T:"E:\Test\Source"
  </code></pre>
  
  <p>Here is the supposed syntax:</p>
  
  <pre><code>New-Hardlink [-Path] &lt;String&gt; [-Target] &lt;String&gt; [&lt;CommonParameters&gt;]
  
  -Path &lt;String&gt;
      Path to the new link.
  
  -Target &lt;String&gt;
      Target of the link.
  </code></pre>
  
  <p>The result is always some from of:</p>
  
  <pre><code>New-Hardlink : Unable to find the file 'E:\Source.
  </code></pre>
  
  <p>Does this command not work with directories but only with files?</p>