O'Reilly logo

Windows PowerShell in Action, Second Edition by Bruce Payette

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

Chapter 7. PowerShell functions

7.1 Fundamentals of PowerShell functions
7.2 Declaring formal parameters for a function
7.3 Returning values from functions
7.4 Using simple functions in a pipeline
7.5 Managing function definitions in a session
7.6 Variable scoping in functions
7.7 Summary

Porcupine quills. We’ve always done it with porcupine quills.

Dilbert

In this chapter, we’ll begin looking at how to combine the features from the previous chapters into reusable commands. As you’ll recall from chapter 2, there are four types of PowerShell commands: functions, cmdlets, scripts, and external commands. Functions and scripts are the two command types that can be written in the PowerShell language. We’ll start with functions as they’re ...

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