Summary

In this chapter, we first examined the scripting policy provided by Windows PowerShell. We looked at the steps involved in configuring Windows PowerShell for scripting use, explored the various flow control statements, and examined scripts that use flow control for advanced scripting needs. We looked at implementing decision making in Windows PowerShell and saw how encapsulated logic can vastly simplify network administration tasks by acting upon routine events when they are presented to the script. Finally, we explored the use of regular expressions to provide advanced pattern-matching capabilities to both scripts and cmdlets.

Get Windows PowerShell™ Scripting Guide 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.