Chapter 12. Working with functions

There are clear-cut guidelines that you can use to design script. You can use these guidelines to ensure that scripts are easy to understand, easy to maintain, and easy to troubleshoot. In this chapter, we examine the reasons for scripting guidelines and provide examples of both good code and bad code design.

Understanding functions

In Windows PowerShell, functions have moved to the forefront as the primary programming element used when writing Windows PowerShell scripts. This is not necessarily due to improvements in functions per se, but rather a combination of factors ...

Get Windows PowerShell 3.0 First Steps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.