PsSnapins is an old way (existing inPowerShell V1) to add CmdLet or Providers (but still in use)
- They need to register (using the installutil.exe tool)
- These are assemblies written in the same .NET language.
Modules is a new way (added in PowerShel V2) to add CmdLet or providers
- They just need to be attached to the file system (see $ env: psmodulepath)
- They can be scripts written in PowerShell (CmdLet only) or assemblies for CmdLet and Providers written in the same .NET language.
There is an explicit form in it that allows you to specify a lot of information about the creator, as well as dependencies on PowerShell versions, Framework versions, or other versions of modules or assemblies.
I think you can use the module if you do not need to support existing PowerShell V1 computers.
source share