I don’t know whether to love Powershell or hate it yet but, here’s a tidbit that could be useful about foreach statements.
Below, both are equivalent; they read the elements of an array and spit out the result.
$array | foreach -process
is the same as
foreach ($i in $array)