Represents a binding for pipeline and command-line input to PowerShell cmdlet parameters. This class facilitates the binding to and handling of input parameters as a string representation of a GUID reference, a string representation of a URI, a GUID or URI referencing an SPSite object, the SPSite object itself, or an SPSiteAdministration object.
Assembly: Microsoft.SharePoint.PowerShell (in Microsoft.SharePoint.PowerShell.dll)
This class inherits from the SPCmdletPipeBind<TCmdletObject> generic base class. The SPCmdletPipeBind<TCmdletObject> parent class is an abstract class providing Read and Discover methods that this class overrides. The Read method is used to retrieve the collection of SharePoint Web sites that is associated with the current SPSitePipeBind object; the Discover method is used to populate the information required to retrieve or recreate the given collection. The cmdlet classes use the Read method to retrieve results.
This class is sealed and cannot be inherited.
You can use this and other pipebind classes to simplify the handling of cmdlet input parameters from the pipeline or the command line. Pipebind classes typically allow input parameters to be passed and referenced as objects, GUIDs that reference objects, or as string representations. Because pipebind types allow for the flexible representation of input data, each pipebind class must include constructors that initialize the object for the representations that it provides.
The following example shows the creation of an SPSitePipeBind object instance from string input:
This instance is passed to the get-spsite cmdlet. Alternatively, if the GUID or URI is passed to get-spsite, the constructor that corresponds to the SPSitePipeBind class is used.