title: Why Get-ChildItem (or ls, or dir) returns different results being executed on x86 and x64 powershell console
body: <p>I started Powershell Console for x86 on my Windows Server machine and executed:</p>
  
  <pre><code>get-childitem C:\Windows\System32\WindowsPowerShell\v1.0\Modules\*s
  </code></pre>
  
  <p>and I get the following list:</p>
  
  <blockquote>
    <p>CimCmdlets,DirectAccessClientComponents,Kds,Microsoft.PowerShell.Diagnostics,NetQos,NetworkConnectivityStatus,PSDiagnostics,ScheduledTasks,TLS</p>
  </blockquote>
  
  <p>Then I started x64 console and executed the same command, and get much wider list of DIRs:</p>
  
  <blockquote>
    <p><strong>BestPractices</strong>,CimCmdlets,DirectAccessClientComponents,<strong>FailoverClusters</strong>,Kds,Microsoft.PowerShell.Diagnostics,NetQos,NetworkConnectivityStatus,<strong>NFS</strong>,PSDiagnostics,ScheduledTasks,<strong>SmbWitness</strong>,TLS</p>
  </blockquote>
  
  <p>I checked the hardlinks for the FailoverClusters module file (which I'm actually tried to import):</p>
  
  <pre><code>PS C:\windows\system32\WindowsPowerShell\v1.0\Modules&gt; fsutil hardlink list C:\Windows\System32\WindowsPowerShell\v1.0\Modules\FailoverClusters\failoverclusters.psd1
  </code></pre>
  
  <p>and I get the following result:</p>
  
  <blockquote>
    <p>\Windows\System32\WindowsPowerShell\v1.0\Modules\FailoverClusters\FailoverClusters.psd1
    \Windows\WinSxS\amd64_microsoft-windows-f..rcluster-powershell_31bf3856ad364e35_6.3.9600.17112_none_8555e001e29b71bc\FailoverClusters.psd1</p>
  </blockquote>
  
  <p>(Note: looks like directory itself has no links, fsutil returns only one entry - same as dirname)</p>
  
  <p>So the question is: why does <code>Get-ChildItem</code> work differently on x86 vs x64 powershell hosts? How does this actually work?</p>
  
  <p>Yes, I understand that FailoverClusters module doesn't work on x86 architecture, but still... I broke my head trying to figure out where is the mistake (accidentally compiled my C# host for x86 architecture), because it always returns me something like "module not found" or "file not found"....</p>