(Affected versions: v2, v5 - v6.0.2, Fixed in v6.1.0)
This command (see Test-1.Path.ps1)
Get-ChildItem -Path $PSHOME -Include *.exe -Recursegets expected powershell.exe and powershell_ise.exe.
The same command with -LiteralPath instead of -Path (see Test-2.LiteralPath.ps1)
Get-ChildItem -LiteralPath $PSHOME -Include *.exe -Recursein PowerShell v5 unexpectedly gets all items in $PSHOME.
It looks like PowerShell.exe -Version 2 shows the same issue.