October 2010
Intermediate to advanced
1008 pages
46h 16m
English
You can use PowerShell variables to store results from any executed command. The following example demonstrates how to use variables:
#$SiteCollection = Get-SPSite "http://portal.companyabc.com"#$SiteCollection.Url#$SiteCollection.Owner
The preceding given command saves site collection (from http://portal.companyabc.com) to a variable $SiteCollection; the variable can then be used to retrieve properties. The preceding example shows how to retrieve Url and Owner properties and display them in the shell.
The value stored to $SiteCollection is a SharePoint-specific .NET Framework object: SPSite and exposes all available properties as in any other .NET language.
To learn more about SharePoint 2010 SDK, ...
Read now
Unlock full access