Powershell and Site Collections

…this post was published on 2014 June 24.

Starting from this post ​I will  use powershell in a Sharepoint 2010 farm, to get some details for site collections.

First, initialize webapps variable  on your farm

$myWebs = Get-SPWEebApplication

Next, parse all these webapps, and get sitecollections url and owner

foreach( $webapp in $myWebs )
            {
               “**** This is the web app : “+$webapp | fl url
               ” and the site collections are: “
               $webapp | get-SPSite | fl url, owner
            }

If you want to see all details about your sitecollection, use

$webapp | get-SPSite | fl *

For more details, read this document

This entry was posted in Powershell, Sharepoint, Sharepoint 2010. Bookmark the permalink.