Unexpected results when reusing a custom object for the pipeline
问题 A while ago I changed my Join-Object cmdlet which appeared to cause a bug which didn’t reveal in any of my testing. The objective of the change was mainly code minimizing and trying to improve performance by preparing a custom PSObject and reusing this in the pipeline. As the Join-Object cmdlet is rather complex, I have created a simplified cmdlet to show the specific issue: (The PowerShell version is: 5.1.16299.248 ) Function Test($Count) { $PSObject = New-Object PSObject -Property @{Name =