SPCmdlet Class
SharePoint 2010
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.
System.Object
InternalCommand
Cmdlet
PSCmdlet
Microsoft.SharePoint.PowerShell.SPCmdlet
SPCmdletUpdateSPInfoPathUserFileUrl
Microsoft.SharePoint.PowerShell.SPGetCmdletBase<TCmdletObject>
Microsoft.SharePoint.PowerShell.SPNewCmdletBase<TCmdletObject>
Microsoft.SharePoint.PowerShell.SPRemoveCmdletBase<TCmdletObject>
Microsoft.SharePoint.PowerShell.SPSetCmdletBase<TCmdletObject>
InternalCommand
Cmdlet
PSCmdlet
Microsoft.SharePoint.PowerShell.SPCmdlet
SPCmdletUpdateSPInfoPathUserFileUrl
Microsoft.SharePoint.PowerShell.SPGetCmdletBase<TCmdletObject>
Microsoft.SharePoint.PowerShell.SPNewCmdletBase<TCmdletObject>
Microsoft.SharePoint.PowerShell.SPRemoveCmdletBase<TCmdletObject>
Microsoft.SharePoint.PowerShell.SPSetCmdletBase<TCmdletObject>
Assembly: Microsoft.SharePoint.PowerShell (in Microsoft.SharePoint.PowerShell.dll)
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.