Why should I avoid using the increase assignment operator (+=) to create a collection

Yes, the increase assignment operator (+=) should be avoided for building an object collection, see also: PowerShell scripting performance considerations. Apart from the fact that using the += operator usually requires more statements (because of the array initialization = @()) and it encourages to store the whole collection in memory rather then push it intermediately … Read more