When you run a PowerShell pipeline, that pipeline might return 0, 1 or many items. If you are assigning the results of that pipeline to a variable, you will get $null, 1 item or an array of items respectively. Sometimes, you won't care about the different types returned, but at other times, you'll actually prefer to force the results to always be an array. In those cases, you can use @( ..
Read More...
Read the complete post at http://blogs.msdn.com/powershell/archive/2009/02/27/converting-to-array.aspx
Posted
Feb 27 2009, 03:25 PM
by
Windows PowerShell Blog