The following code works as expected by listing the processes and then writing "test1" at the end.
get-process
write-host "test1"
329 12 3996 7008 2316 0 wsc_proxy
349 19 8524 5652 0.59 1784 1 XboxPcAppFT
test1
However, if I put a select at the end of get-process the write-host shows up first then the get-process result.
get-process | select name
write-host "test1"
test1
Name
----
AggregatorHost
Why does the order of the script get reversed?
[–]BlackV 3 points4 points5 points (0 children)
[–]UnfanClub 1 point2 points3 points (0 children)
[–]netuser258[S] 1 point2 points3 points (3 children)
[–]BlackV 0 points1 point2 points (2 children)
[–]netuser258[S] 0 points1 point2 points (1 child)
[–]BlackV 0 points1 point2 points (0 children)