PSSnapIn Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Serves as a base class for Windows PowerShell snap-ins that are used to register all the cmdlets and providers in an assembly. (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.PSSnapIn
              Microsoft.PowerShell.Commands.GetEventPSSnapIn
              Microsoft.PowerShell.PSCorePSSnapIn
              Microsoft.PowerShell.PSHostPSSnapIn
              Microsoft.PowerShell.PSManagementPSSnapIn
              Microsoft.PowerShell.PSSecurityPSSnapIn
              Microsoft.PowerShell.PSUtilityPSSnapIn
              Microsoft.WSMan.Management.WSManPSSnapIn

Public MustInherit Class PSSnapIn
	Inherits PSSnapInInstaller

NameDescription
System_CAPS_protmethodPSSnapIn()

Creates a new PSSnapIn 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_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_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 all the cmdlets and providers in an assembly. If you want to register a subset of the cmdlets and providers in the assembly, or if you want to register cmdlets and providers that are in different assemblies, use the CustomPSSnapIn class.

Your snap-in assembly should be installed into protected directories just as they would be 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 a runspace with the functionality of your own cmdlets and providers. For more information aboutWindows PowerShell snap-ins, see Windows PowerShell Snap-ins.

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: