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.
$web = Get-SPWeb -Identity "http://sp2013/sites/sitecol/subsite"
18.221.13.173