Can someone share the query to get Site owner and site collection manager information from all sites and sub-sites in a SharePoint 2013 site collection?
1 Answer
Assuming by "site collection manager" you mean "site collection administrator" then this script should do the trick to help you identify content owners: http://techtrainingnotes.blogspot.com/2014/11/sharepoint-use-powershell-to-get-all.html?m=1 Per the above script, this will get you all owners:
Get-SPSite -Limit All |
Get-SPWeb -Limit All |
where { $_.HasUniquePerm -and $_.AssociatedOwnerGroup -ne $null } |
foreach { $TTNweburl = $_.Url; $_ } |
Select -ExpandProperty AssociatedOwnerGroup |
Select -ExpandProperty Users |
Select {$TTNweburl}, UserLogin, DisplayName
-
1Please avoid just posting a link as an answer. You should cite the relevant parts of the linked content in case the link breaks or the linked site goes down.– jcpCommented Mar 11, 2016 at 10:34
-
1Thanks for the feedback. I'll improve my answers, but as a fellow blogger, I'd much rather send the asker to the author than copying and pasting parts of the author's post here. Thoughts? Commented Mar 11, 2016 at 10:40
-
thanks for the response but I am looking for all sites/sub-sites owner information not all users having full control permission. can you provide if you have any script or suggestion.– MSKPCommented Mar 11, 2016 at 16:24
-
The first script from the link gives you all owners..I've added it to my answer above. Commented Mar 13, 2016 at 10:26