February 2013
Beginner
704 pages
21h 31m
English
After completing this chapter, you will be able to:
Understand functions.
Use functions to encapsulate logic.
Use functions to provide ease of modification.
Use functions to provide ease of reuse.
There are clear-cut guidelines that can be used to design functions. These guidelines can be used to ensure that functions are easy to understand, easy to maintain, and easy to troubleshoot. This chapter will examine the reasons for the scripting guidelines and provide examples of both good and bad code design.
In Microsoft 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 ...