Get a Specific Subsite (Web)


Scenario/Problem: You need to obtain a specific subsite reference.


Solution: Use the Get-SPWeb cmdlet to assign a variable the results using the -Identity parameter.

Providing the identity of the subsite with the Get-SPWeb cmdlet retrieves a specific subsite. Use this to assign the results to an object for use in other cmdlets, as shown in Listing 8.13.

Listing 8.13. Assigning a Variable to a Specific Subsite


$web = Get-SPWeb -Identity "http://sp2013/sites/sitecol/subsite"


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.13.173