From the course: PowerShell for SQL Server Administration

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Piping between objects

Piping between objects - PowerShell Tutorial

From the course: PowerShell for SQL Server Administration

Start my 1-month free trial

Piping between objects

- [Instructor] So let's go ahead and talk about piping between various objects and piping between cmdlets. So we've already shown this in some of our demos 'cause we've already been piping commands and piping output from one cmdlet to another. We're going to talk about it a little bit more and what we're actually doing. So, piping values between cmdlets is going to allow us to see the real power of PowerShell here. This is where we can actually use multiple cmdlets in a single command by simply passing information from one cmdlet to another. So piping allows the results from the first cmdlet to be passed to the second cmdlet without storing the results in a variable. So this is where the real power of PowerShell comes from, 'cause you can actually end up building a fairly complex commands with multiple steps as a single line. So this is how we can say we can do 15 lines worth of operations in a single line. It might be a long line but it's a single line. So when we string two cmdlets…

Contents