Get Site Collection properties using PowerShell – SharePoint 2013

Today I am just going to blog about how to get certain information about site collections to which SharePoint Administrators might not have access to. This question comes up quite often on SharePoint forums.

If you are looking to get information for the site collection or want to generate report on site collection properties then your best friend is Get-SPSiteAdministration cmdlet. This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets.

If you want to learn how to use parameters sets then follow the link below.

https://msdn.microsoft.com/library/dd878348(VS.85).aspx

For example if you would like to list primary site collection administrator and secondary site collection administrator then you would use something like,

Get-SPSiteAdministration -identity SITECOLLECTIONURL -Limit ALL | Select -Property OwnerDisplayName, SecondaryContactDisplayName

Here is the list of all the properties that you can get using this cmdlet.

https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsiteadministration_properties.aspx

Similar to this there is Set-SPSiteAdministration cmdlet which can be used to set different properties for the site collections.