O'Reilly logo

Automating Microsoft® SharePoint® 2010 Administration with Windows PowerShell® 2.0 by Shannon Bray, Gary Lapointe

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 3

Making Your PowerShell Reusable

IN THIS CHAPTER, YOU WILL LEARN TO:

  • SCRIPT YOUR SOLUTIONS

    Create and Execute Scripts

    Execute Script Blocks

    Define Script Parameters

    Comment Your Scripts

  • UNDERSTAND THE USE OF FUNCTIONS

    Create Functions

    Define Function Parameters

    Process Pipeline Data

    Understand Scopes

  • COMPARTMENTALIZE WITH MODULES

    Create and Load Script Modules

    Create Module Manifests

  • ADD ERROR HANDLING TO SCRIPTS

    Throw Errors

    Use Trap Blocks

    Use Try/Catch/Finally Blocks

    Understand Object Disposal Issues

Until now, all the examples you've seen could easily be done within the Windows PowerShell console window, where each command is entered and executed one line at a time. Using the Windows PowerShell console window is great for really ...

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