Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CustomPSSnapIn Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

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)

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Configuration.Install.Installer
        System.Management.Automation.PSInstaller
          System.Management.Automation.PSSnapInInstaller
            System.Management.Automation.CustomPSSnapIn

public abstract class CustomPSSnapIn : PSSnapInInstaller

NameDescription
System_CAPS_protmethodCustomPSSnapIn()

Creates a new CustomPSSnapIn object. (Be aware that Windows PowerShell 2.0 introduced support for modules, which is the preferred method to add cmdlets and providers.)

NameDescription
System_CAPS_protpropertyCanRaiseEvents

(Inherited from Component.)

System_CAPS_pubpropertyCmdlets

Gets the cmdlets defined in custom mshsnapin.

System_CAPS_pubpropertyContainer

(Inherited from Component.)

System_CAPS_pubpropertyContext

(Inherited from Installer.)

System_CAPS_pubpropertyDescription

Gets the description of the Windows PowerShell snap-in.(Inherited from PSSnapInInstaller.)

System_CAPS_pubpropertyDescriptionResource

Gets the localization resource information for the description of the Windows PowerShell snap-in.(Inherited from PSSnapInInstaller.)

System_CAPS_protpropertyDesignMode

(Inherited from Component.)

System_CAPS_protpropertyEvents

(Inherited from Component.)

System_CAPS_pubpropertyFormats

Gets the list of format files that are loaded for the Windows PowerShell snap-in.

System_CAPS_pubpropertyHelpText

(Inherited from Installer.)

System_CAPS_pubpropertyInstallers

(Inherited from Installer.)

System_CAPS_pubpropertyName

Gets the name of the Windows PowerShell snap-in.(Inherited from PSSnapInInstaller.)

System_CAPS_pubpropertyParent

(Inherited from Installer.)

System_CAPS_pubpropertyProviders

Gets the Windows PowerShell providers that are registered by the Windows PowerShell snap-in.

System_CAPS_pubpropertySite

(Inherited from Component.)

System_CAPS_pubpropertyTypes

Gets a list of the .NET Framework types that are loaded for the Windows PowerShell snap-in.

System_CAPS_pubpropertyVendor

Gets the vendor of the Windows PowerShell snap-in.(Inherited from PSSnapInInstaller.)

System_CAPS_pubpropertyVendorResource

Gets the localization resource information for the vendor of the Windows PowerShell snap-in.(Inherited from PSSnapInInstaller.)

NameDescription
System_CAPS_pubmethodCommit(IDictionary)

(Inherited from Installer.)

System_CAPS_pubmethodCreateObjRef(Type)

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDispose()

(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

(Inherited from Component.)

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Component.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_protmethodGetService(Type)

(Inherited from Component.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodInstall(IDictionary)

Installs the component in the Windows PowerShell runtime.(Inherited from PSInstaller.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

(Inherited from MarshalByRefObject.)

System_CAPS_protmethodOnAfterInstall(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethodOnAfterRollback(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethodOnAfterUninstall(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethodOnBeforeInstall(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethodOnBeforeRollback(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethodOnBeforeUninstall(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethodOnCommitted(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethodOnCommitting(IDictionary)

(Inherited from Installer.)

System_CAPS_pubmethodRollback(IDictionary)

Rolls back the component to a previous state.(Inherited from PSInstaller.)

System_CAPS_pubmethodToString()

(Inherited from Component.)

System_CAPS_pubmethodUninstall(IDictionary)

Uninstalls the component from the Windows PowerShell runtime.(Inherited from PSInstaller.)

NameDescription
System_CAPS_pubeventAfterInstall

(Inherited from Installer.)

System_CAPS_pubeventAfterRollback

(Inherited from Installer.)

System_CAPS_pubeventAfterUninstall

(Inherited from Installer.)

System_CAPS_pubeventBeforeInstall

(Inherited from Installer.)

System_CAPS_pubeventBeforeRollback

(Inherited from Installer.)

System_CAPS_pubeventBeforeUninstall

(Inherited from Installer.)

System_CAPS_pubeventCommitted

(Inherited from Installer.)

System_CAPS_pubeventCommitting

(Inherited from Installer.)

System_CAPS_pubeventDisposed

(Inherited from Component.)

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 [ps].

For more information about registering snap-ins, see How to Register Cmdlets, Providers, and Host Applications [ps].

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

Return to top
Show: