C:\scripts\test\sub <------------ This is a folder. Why is it included??? How can I exclude it? C:\scripts\test\sub\file1.cs C:\scripts\test\file1.cs C:\scripts\test\file2.cs
Get-Help Get-ChildItem -detailed ... -exclude <string> Omits the specified items. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "*.txt". Wildcards are permitted.
This parameter does not work properly in this cmdlet. <------- They weren't joking!