Good evening
If we use the -Include argument with Get-Childitem on the FileSystem Provider, then Get-Childitem changes it's behaviour:
Steps to reproduce
OK: Without the -Include argument Get-ChildItem works as expected:
PS C:\Temp> Get-ChildItem
Directory: C:\Temp\= EdNe - Beröa
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10.03.2017 16:48 106678 1001-600x600.jpg
-a---- 10.03.2017 16:48 58204 1519-600x600.jpg
Inconsequent and therefore annyoing if we use the -Include Argument
PS C:\Temp> Get-ChildItem -Include @('*.*')
PS C:\Temp> _(no result returned)_
Expected behavior
Of course,
Get-ChildItem -Include @('*.*')
should return the same results as
Get-ChildItem
Actual behavior
If we use the -Include Argument, then Get-ChildItem must process the same directories - independent if we use the -Indlude Argument.
Environment data
Name Value
---- -----
PSVersion 5.1.14393.693
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.693
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Reactions are currently unavailable
Good evening
If we use the -Include argument with Get-Childitem on the FileSystem Provider, then Get-Childitem changes it's behaviour:
Steps to reproduce
OK: Without the -Include argument Get-ChildItem works as expected:
PS C:\Temp> Get-ChildItem Directory: C:\Temp\= EdNe - Beröa Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 10.03.2017 16:48 106678 1001-600x600.jpg -a---- 10.03.2017 16:48 58204 1519-600x600.jpgInconsequent and therefore annyoing if we use the -Include Argument
PS C:\Temp> Get-ChildItem -Include @('*.*') PS C:\Temp> _(no result returned)_Expected behavior
Of course,
Get-ChildItem -Include @('*.*')
should return the same results as
Get-ChildItem
Actual behavior
If we use the -Include Argument, then Get-ChildItem must process the same directories - independent if we use the -Indlude Argument.
Environment data
Name Value ---- ----- PSVersion 5.1.14393.693 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.14393.693 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1