O'Reilly logo

Windows PowerShell in Action 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. Functions and scripts

7.1

Function basics

178

7.2

Formal parameters and the param statement

181

7.3

Returning values from functions

193

7.4

Using functions in a pipeline

199

7.5

Managing functions

204

7.6

Scripts at long last

205

7.7

Summary

212

 

And now for something completely different...

 
 --Monty Python
 

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

 
 --Dilbert

Seven chapters in and no scripts? Okay—fine—here you go:

"Hello, world"

As you will have astutely observed from the title, in this chapter we finally get into writing PowerShell scripts in all their myriad forms. As mentioned in chapter 2, functions and scripts are two of the four types of PowerShell commands (the others are cmdlets and external commands). Prior programming experience ...

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