CHAPTER 7Flow Control and Object Disposal
Like other powerful programming and scripting languages, Windows PowerShell supports looping and branching logic. The looping statements in Windows PowerShell let you perform sequences of commands on all members of a collection (such as sites in a site collection) or on only those that meet a particular condition. Windows PowerShell also includes two cmdlets that can be used for flow control. This chapter covers how to use these flow-control facilities, as well as how to dispose of objects.
Conditional Statements
Windows PowerShell supports the conditional statement if/elseif/else, which branches execution based on a condition, and the switch statement, which can handle multiple complex conditions. ...
Get PowerShell for Microsoft SharePoint 2010 Administrators 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.