From the course: PowerShell 7 Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Combine commands - PowerShell Tutorial
From the course: PowerShell 7 Essential Training
Combine commands
- [Illustrator] One of the goals of using PowerShell is to create PowerShell scripts that we can reuse again and again and again. But more importantly, that we can actually hand off to other individuals, other organizations that wish to use them too. Now, of course, what we need to do when we building them is we want to make them as streamlined as possible. So we don't just want to say, hey, here's 50,000 lines of PowerShell, it will do exactly what you want to do. The goal is to make it not only readable, but also optimized in the way that it runs. By reducing the code that's needed, because often it can be quite easy to write hundreds and thousands of lines of PowerShell. When in reality, we do have mechanisms for joining commands together. Now, as an example of this, we've been executing these commands quite frequently, but the very first one that obviously we've used is the pipe command. So the pipe command allows…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.