Datasheet

34 CHAPTER 1
WINDOWS POWERSHELL 101
rver_name; a GUID, in the form 1234-5678-9807, or an
SPSite object.
Required? false
Position? Named
Default value
Accept pipeline input? True
Accept wildcard characters? false
From this snippet, you can see that the
Get-SPWeb
cmdlet can take an
SPAssignmentCollection
object (which is discussed in Chapter 3) via the pipe-
line, but you cannot pass the
Identity
parameter via the pipeline. Also notice
that you can pass in an
SPSitePipeBind
object via the pipeline. So what is a
PipeBind
object?
PipeBind Objects
As you look through the various SharePoint cmdlets, you will notice that most
of them have one or more parameters that take a special object type called a
PipeBind
object. Examine again the  rst parameter from the help text of the
Get-SPWeb
cmdlet shown earlier. Following is the relevant piece:
-Identity <SPWebPipeBind>
Specifies the name or full or partial URL of the subsite.
If you use a relative path, you must specify the Site
parameter.
A valid URL in the form http://server_name or a relative
path in the form of /SubSites/MySubSite.
Required? false
Position? 1
Default value
Accept pipeline input? False
Accept wildcard characters? false
Within SharePoint, many objects (such as the
SPWeb
and
SPSite
objects) can be
represented di erently. An
SPSite
object, for example, can be represented using
either a URL, a GUID (unique identi er), or an actual
SPSite
object.
PipeBind
objects allow you to use either of these representations for the parameter value.
WARNING
One thing to note is that the name is a bit misleading. Not all
PipeBind
parameters can accept input from the pipeline.
c01.indd 34c01.indd 34 5/16/2011 11:12:34 AM5/16/2011 11:12:34 AM