现在我使用PowerShell 5.0.10586.0更新到Windows 10 TH2 Build 10586
现在我遇到了Get-ChildItem的问题
$files = Get-ChildItem -LiteralPath $path -Force -Recurse -Include *.txt
Run Code Online (Sandbox Code Playgroud)
这将返回$ path中的所有文件,即使它们不是.txt.这在更新之前有效.当我改为
$files = Get-ChildItem -Path $path -Force -Recurse -Include *.txt
Run Code Online (Sandbox Code Playgroud)
它又有效了.但这不是我想要的.这是一个错误还是我做错了什么?