Share via

SPCmdlet Class

Represents an abstract base class for all custom cmdlets that are written to be used in SharePoint deployments, providing uniform behavior across all SharePoint cmdlets.

Inheritance Hierarchy


Namespace:  Microsoft.SharePoint.PowerShell
Assembly:  Microsoft.SharePoint.PowerShell (in Microsoft.SharePoint.PowerShell.dll)


<SPCmdletAttribute> _
Public MustInherit Class SPCmdlet _
    Inherits PSCmdlet
Dim instance As SPCmdlet
public abstract class SPCmdlet : PSCmdlet


Use this base class when writing cmdlets for use with SharePoint deployments. This class inherits from System.Management.Automation.PSCmdlet, so it provides all of the functionality of the Windows PowerShell framework, while adding a set of SharePoint-specific functions that are most commonly used across the SharePoint platform.

The core workload of every cmdlet that inherits from the SPCmdlet base class is completed by overriding the virtual method, InternalProcessRecord(). This method is called from the ProcessRecord() method.

Thread Safety

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

See Also


SPCmdlet Members

Microsoft.SharePoint.PowerShell Namespace