SPWebPipeBind Class

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 SharePoint Web site, and as the string representation of a GUID reference to or the URL of the site.

Inheritance Hierarchy


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


Public NotInheritable Class SPWebPipeBind _
    Inherits SPCmdletPipeBind(Of SPWeb)
Dim instance As SPWebPipeBind
public sealed class SPWebPipeBind : SPCmdletPipeBind<SPWeb>


This class inherits from the SPCmdletPipeBind<TCmdletObject> generic base class, an abstract class providing Read and Discover methods that this class overrides. The Read method is used to retrieve the server object instance that is associated with the current SPWebPipeBind object; the Discover method is used to populate the information that is required to retrieve or recreate the given SPWeb object. 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 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 SPWebPipeBind instance from the string input "http://example". This instance is passed to the get-spsite cmdlet.

get-spweb "http://example"

Alternatively, a GUID or URI could be passed to get-spweb and then the corresponding constructor of the SPWebPipeBind class would be used.

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


SPWebPipeBind Members

Microsoft.SharePoint.PowerShell Namespace