October 2010
Intermediate to advanced
1008 pages
46h 16m
English
One of the most common scenarios when you use PowerShell is retrieving sites collections and sites. To retrieve the list of site collections, simply type Get-SPSite in the Shell.
To retrieve the list of all SharePoint sites in a site collection, Get-SPSite needs to be combined with Get-SPWeb. For example, type the following:
Get-SPSite | Get-SPWeb
This command lists all site collections in a SharePoint farm and then lists all the websites in each site collection.
In case you need to list format or all object properties, type
Get-SPSite | Select *
Your PowerShell shell lists all the site collections with all the associated properties.
Read now
Unlock full access