Export (0) Print
Expand All

CustomPSSnapIn Class

Serves as a base class for snap-ins that are used to register a list of cmdlets and providers. (Be aware that Windows PowerShell 2.0 introduced support for modules, which is the preferred method to add cmdlets and providers.)


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim instance As CustomPSSnapIn

public abstract class CustomPSSnapIn : PSSnapInInstaller
public abstract class CustomPSSnapIn extends PSSnapInInstaller
public abstract class CustomPSSnapIn extends PSSnapInInstaller

This class should be used when you want to register a subset of the cmdlets and providers in one assembly, or when you want to register cmdlets and providers that are in different assemblies. If you want to register all the cmdlets and providers in one assembly, use the PSSnapIn class.

You should install your snap-in assembly into protected directories just as you would with other operating system programs; otherwise, malicious users could replace your assembly with unsafe code. These assemblies are used to register cmdlets and providers, which allows you to extend the functionality of the Windows PowerShell shell with the functionality of your own cmdlets and providers. For more information about snap-ins, see Windows PowerShell Snap-ins.

For more information about registering snap-ins, see Registering Cmdlets, Providers, and Host Applications.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft