title: Get-ChildItem -File or -Directory doesn't work under different user context
body: <p>I have a PowerShell cmdlet with the following line</p>
  
  <pre><code>$items = Get-ChildItem -Path $FolderName -File -Force |
           Sort CreationTime |
           Select -First 1 -Last 1
  </code></pre>
  
  <p>It works fine under my normal login but if I log onto my machine as a domain admin I get an error message telling me that <code>-File</code> is not recognised as a valid parameter for <code>Get-ChildItem</code>.</p>
  
  <p>I suspected that the domain admin was running an earlier version of PowerShell so under both accounts I have run <code>$PSVersionTable.PSVersion</code> and get the following:</p>
  
  <pre>
  Major  Minor  Build  Revision
  -----  -----  -----  --------
  5      0      10586  117
  </pre>
  
  <p>If anything I would expect my local login to fail and the domain admin login to succeed due to permissions differences but it seems to be working the other way around.</p>