February 2013
Intermediate to advanced
304 pages
8h 26m
English
Scenario/Problem: You need to obtain a specific site collection reference.
Solution: Use the Get-SPSite cmdlet to assign a variable the results using the -Identity parameter.
Providing the identity of the site collection with the Get-SPSite cmdlet retrieves a specific site collection. Use this to assign the results to an object for use in other cmdlets, as shown in Listing 8.4.
Listing 8.4. Assigning a Variable to a Specific Site Collection
$siteCol = Get-SPSite -Identity "http://sp2013"
Read now
Unlock full access