(Get-ChildItem -File -Recurse -Path $path).Fullname returns array of full names
(Get-ChildItem -File -Recurse -Path $path).Name returns array of files names
but
(Get-ChildItem -File -Recurse -Path $path).Length returns only one value - the count of elements
Question - how to get result as array of file lengths ?
The one value you get is indeed the length of the resulting array - the Array class has an explicit
Lengthproperty that takes precedence over property enumeration.To get the individual
Lengthproperty values from each item in the array, pipe to eitherSelect-ObjectorForEach-Object, like so: