Get-ChildItem with -File and -Exclude parameters causes all files to always be excluded #16695
Open
5 tasks done
Labels
Area-FileSystem-Provider
specific to the FileSystem provider
Needs-Triage
The issue is new and needs to be triaged by a work group.
WG-Engine-Providers
built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.


ReneRebsdorf commentedJan 4, 2022
Prerequisites
Steps to reproduce
When using the Get-ChildItem cmdlet, I would expect -File to filter for only files, and when using -Exclude, these files should be possible to further filter. Instead when using the -File and the -Exclude parameters, no files are returned.
The problem is only reproducable with the -File parameter, not the -Directory parameter.
Expected behavior
Actual behavior
Error details
No errors are returnedEnvironment data
Visuals
No response
The text was updated successfully, but these errors were encountered: