title: Bug or Feature? Powershell 7.2.6 Move-Item re-cases moved file on Windows 10
body: <p>When using Move-Item cmdlet in PowerShell (7.2.6) on Windows 10, the file will be 're-cased' from its existing case, to whatever casing is used in the <code>-Path</code> parameter used to identify it. As windows is case-insenstive in its filesystem we'd expect a match on the path, but I didn't expect the moved file to be re-cased to that used to find it (rather than the on-disk original casing of the file).</p>
  <p>Is this a bug or a feature? I can't find anything that mentions this behaviour in the <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/move-item?view=powershell-7.2" rel="nofollow noreferrer">documentation</a></p>
  <p>For example:</p>
  <pre><code>&lt;# PowerShell Script to demonstrate how Move-Item changes the casing of a file 
     based on the case used in the Path parameter.
  #&gt;
  
  $base_dir = '~'
  $original_file_name = 'test.txt'
  $original_file_path = [System.IO.Path]::Combine($base_dir, $original_file_name)
  $search_filename = $original_file_path.ToUpper()        # deliberaly change the case of the file
  $move_to_path = [System.IO.Path]::Combine($base_dir, 'testsubfolder')   # this folder will be removed so ensure it doesn't match something you already have in your home folder that you want to keep
  $cleanup = $true    # set to false to persist files used for testing
  
  # Create a file to test
  Set-Content -Path $original_file_path -Value &quot;hello world&quot;
  
  # Setup a subfolder to move the file to
  if ((Test-Path -Path $move_to_path)) { Remove-Item -Path $move_to_path }
  New-Item $move_to_path -ItemType Directory -Force | Out-Null
  
  # Show the casing of the original file
  Get-ChildItem -Path ([System.IO.Path]::Combine($base_dir, '*')) -Filter $original_file_name | Select-Object -Property FullName
  
  # Deliberately case the name of the file differently, starting with a capital 'T'
  Move-Item -Path $search_filename -Destination $move_to_path | Out-Null
  
  #Show the casing of the 'moved' file
  Get-ChildItem -Path $move_to_path | Select-Object -Property FullName
  
  if ($cleanup)
  {
      if (Test-Path -Path $original_file_name -PathType Leaf) { Remove-Item -Path $original_file_name }
      if (Test-Path -Path $move_to_Path -PathType Container) { Remove-Item -Path $move_to_path }
  }
  
  </code></pre>
  <p>You'll get output of:</p>
  <pre><code>FullName
  --------
  C:\Users\You\test.txt
  C:\Users\You\subfolder\TEST.TXT
  </code></pre>
  <p>As you can see, the moved file now has a casing which matches what was used to specify the original path, not the casing of the original file. I'd have thought that as the name implies, the file should be moved, not 're-case'. Yes, on a Windows system this is functionally the same file as Windows is not case sensitive, but I'd have thought that PowerShell 7.2.6 being cross platform, that this would be unwanted behaviour on Windows.</p>
  <p>This caused me some minor issues when packaging an application used on a linux based system which was expecting a different file casing (the file was re-cased because of this behaviour).</p>
  <p>Is this a bug or a feature?</p>