Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

PowerShell PowerTip: What is the point of Out-Variable?

A lot of times people see others using the common parameter -OutVariable instead of the best practice $var = <value>. This leads to a lot of folks wondering why OutVariable  exists. The real use for OutVariable is to save your data off, while still letting it get sent along the output stream. What this means is that you could use it...