PowerShell Core for Linux Administrators Cookbook
上QQ阅读APP看书,第一时间看更新

Finding and installing PowerShell modules

Loosely coupling the components is one of the keys to the success of a framework. PowerShell follows this principle as well. All cmdlets are packaged within PowerShell modules. The modules can be first-party provided, created by you, or created by other software vendors.

Initially, extending PowerShell capabilities was done using snap-ins. With PowerShell 2.0, PowerShell modules were introduced. One other place that Microsoft has gotten it right is advocating the use of modules over snap-ins. The installation of PowerShell modules, which could have been a hassle in the past, has been streamlined today. PowerShell now comes pre-packaged with a package manager called PowerShellGet, which connects to the official Microsoft PowerShell Gallery (https://www.powershellgallery.com). The PowerShell Gallery is an online repository that contains modules, scripts, and other utilities that have been created by providersas well as the communitythat administrators can download and install to extend PowerShell's capabilities.

While it is possible to download PowerShell modules from third-party sites, our focus in this book will be on the PowerShell Repository.