Modules

PowerShell modules are another way to implement reusability in your scripting. A PowerShell module is more extensive than a function because it can contain multiple items like functions, variables, providers, workflows, and so on. Modules can also persist on a disk, and can be referenced or imported by other scripts.

There are four types of modules as of PowerShell V4:

  • A script module is created from a PowerShell script code.
  • A binary module is based on a dynamic linked library (dll) file.
  • A manifest module is a module that includes a manifest, which describes what a module contains and how it is processed (visit http://msdn.microsoft.com/en-us/library/dd878337(v=vs.85).aspx).
  • A dynamic module is one that is not persisted to a disk. These can ...

Get PowerShell for SQL Server Essentials 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.