@($null)
is an array with one element $null
(hence a property Count
1
). Similarly @($null,$null).Count
- 2
, and @().Count
- 0
. Be aware of what @($null)
emits $null
into the pipeline, so the property Count
returned from @($null) | Measure-Object
will be 0
.
source
to share