In this section, we will cover the following topics:
What is a module?
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 should deliver and where it should be placed. Use this code to find the module path:
$env:PSModulePath -split ';'
You will see two different paths, where one is the system location and the other is the user profile location, as follows: