Stop Writing Text to the Pipeline: Why PSCustomObject Pays Off in PowerShell Scripts
Ad‑hoc text output dies at the console. Emitting [pscustomobject] instead makes PowerShell scripts reusable by Format-*, ConvertTo-*, and Export-* cmdlets, with a few allocation and serialization trade‑offs worth understanding.