From googling a bit on this I think the difference between the two is how Write-Output handles $null vs. the pipeline, but I would imagine Write-Output's dropping of $null as input would be preferable over the pipeline. Can anyone who knows the reason(s) to use one method over the other please shed some light on it?
I did search to see if this was already asked but couldn't find anything.
Thanks in advance.
PS. oh and by the way – many thanks for all of the amazing help in the free ebooks / scripts / this forum!
by jeremytbradshaw at 2013-03-10 10:31:27
I found this! – http://technet.microsoft.com/en-us/maga ... 50381.aspx. And in there, Don Jones explains what storing the new custom object in a variable can be handy for, such as if you want to later modify the object (e.g. adding a custom TypeName to it).
Feel free to close this one unless somebody has more input.