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

Compartmentalize with Modules

A Windows PowerShell module is a self-contained, reusable package of variables, functions, scripts, cmdlets, providers, aliases, and much more. Code within a module executes in its own scope and does not affect resources declared outside that scope. With modules, it's possible to expose items selectively within the module to outer scopes, thus facilitating the concept of private members.

There are four types of modules that can be created to package and deploy Windows PowerShell capabilities:

Script modules Script modules are created by simply renaming a Windows PowerShell script file so that it has a .psm1 extension. Use the Export-ModuleMember cmdlet to expose functions and variables outside of the module.

Binary ...

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