Modules and Snap-Ins
Modules are packaged collections of commands that may be loaded inside PowerShell, allowing PowerShell to interact with new systems and services. Modules come from a wide variety of different sources.
PowerShell itself is installed with a small number of modules, including ThreadJob
and PSReadline
.
You can install modules by adding Windows features or enabling capabilities, for example, the ActiveDirectory
and GroupPolicy
modules.
Some applications include modules; for example, Microsoft Local Administrator Password Solution (LAPS) includes a PowerShell module in the installer that you can use to manage some of the features of the application.
The Windows platform itself includes many modules, most of these having been included since Windows 8 was released.
Finally, you can install modules from the PowerShell Gallery or another registered repository. The PowerShell Gallery can include updated versions of PowerShell installed modules.
The PowerShell Gallery is therefore a valuable source of modules published by Microsoft, VMware, Amazon Web Services, and many others.
Snap-ins were included in PowerShell 1 and largely replaced with modules with the release of PowerShell 2. PowerShell 7 does not support snap-ins; snap-ins are limited to Windows PowerShell.
The chapter covers the following topics:
- Introducing modules
- Using Windows PowerShell modules in PowerShell 7
- PowerShellGet 3.0
- PowerShell repositories
- About snap-ins