Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Error handling through the pipeline

$
0
0

There's also a bit of a balancing act between memory utilization and execution time. Using the pipeline allows you to stream objects and not have to store the entire result set in memory at any one time, but tends to be slower than the foreach loop in many cases. AD throws another wrench in the gears, as pipelines that take too long to finish executing can wind up "timing out." The actual error message you'd see is something like "Invalid enumeration context", and it's something to keep in mind if your environment is large.


Viewing all articles
Browse latest Browse all 13067

Trending Articles