Understanding PowerShell modules

Windows PowerShell modules present a simple way to organize and package our script so as to make it distributable and reusable.

In this section, we will cover the following topics:

  • What is a module?
  • Script modules
  • Binary modules
  • Manifest modules
  • Dynamic modules

Introduction to modules

Windows PowerShell can be created dynamically or persisted to our disk. While discussing PowerShell modules, for a moment I thought about the old-style snap-ins in PowerShell version 1.0, which still exist. Yeah! SharePoint still has snap-ins and not modules.

Snap-ins only contain cmdlets and providers, whereas in modules, we can have functions, variables, aliases, and PowerShell drives.

Before we create a module, we need to know what a module ...

Get PowerShell: Automating Administrative Tasks 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.