What is snapin?
PowerShell two main ways to add or extend the shell:
Snap-Ins - Are compiled cmdlets in to a DLL written in a .Net language are bening deprecated and no longer recomended as the way to create and package new cmdlets.
Modules - A package that contains Windows PowerShell commands int he form of functions, cmdlerts and worksflows, in addition it may contain variables, aliases and providers. Modules can be written in PowerShell and/or compiled as DLLs.
Here we will try to get existing registered modules in shell.
Modules have primarily 2 locations on your system
Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules Directory: C:\Users\XXX\Documents\WindowsPowerShell\Modules;
Profile location is needed for load default modules in shell, as once we close the PS session all registered get every time.
to load these registered modules we can create own profile.
We will see why profile location needed in later half
Directory: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules
I have registered modules here SqlServerCmdletSnapin100, WDeploySnapin3.0
There is way to review what's in the Power Tools and
to get the full list of cmdlets installed by the TFS Power Tools is to use:
One of the nice things is that raw TFS API objects are being returned, and the snap-ins define custom Windows PowerShell formatting rules for these objects.