Bug: -Exclude does not work as -Include does in Get-ChildItem, or as expected
Three folders; d1, d2, d3, with files test.txt and test.mp3 in in d1 and d3.
'-Include d1' includes only content from d1. Would expect '-Exclude d1' to include the inverse, but it has no effect, it returns all data.
unless it's run after -Include.
So '-Include d1 -Exclude d1' returns nothing, as expected.
Exclude only works as it applies to a file name, not a path.
So '-Exclude .txt' will exclude all files '.txt' as expected.
The syntax usage in the help file is identical for both parameters.
Please fix -Exclude parameter so that it works on the Path consistently, as the documentation states it should.