O'Reilly logo

Pro Windows PowerShell by Hristo Deshev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.4. Summary

In this chapter, I started with the basics of creating and invoking scripts. Real scripters are never content with the basics, so I continued by demonstrating how to pass parameters, pipe objects, and return values from a script. We did that by comparing script files to functions and script blocks—when it comes to rules about passing parameters, processing pipeline input, and returning values, those three objects behave in the same way.

An important section of this chapter was dedicated to using PowerShell from other environments like cmd.exe and integrating it: you learned how to call a PowerShell script and how to return a meaningful exit code. This makes our script files good citizens in the console application world.

Last, but ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required