PowerShell: Automating Administrative Tasks
by Michael Shepard, Chendrayan Venkatesan, Sherif Talaat, Brenton J.W. Blawat
Summary
This chapter explored some of the fundamental components that are required for creating PowerShell scripts. These components include functions, loops, and switches. Each of these structures has a purpose within your scripts and can reduce the amount of effort in creating your scripts.
During this chapter, you explored how to create the structure of functions. You also learned how to feed arguments into these scripts and return values from a function.
The chapter also explained how you can create different types of looping structures. These looping structures include Do/Until, Do/While, ForEach, and For. The Do/Until loop was designed to execute until a variable equals a value. The Do/While loop will execute while a variable equals a value. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access