0

I've been able to get the following:

Get-SPSite -Limit All | 
Get-SPWeb -Limit All | 
where { $_.HasUniquePerm -and $_.AssociatedOwnerGroup -ne $null } | 
foreach { 
$url = $_.Url; $_ } | 
Select -ExpandProperty AssociatedOwnerGroup | 
Select -ExpandProperty Users | 
Select {$url}, UserLogin, DisplayName | Export-csv c:\test.csv -notypeinformation

This gives me the site url, site owner's logins and display names. However, I can't figure out how to also get the site title. I seem restricted to either getting the title or the url of a site. How can I pull back both through this method?

3

Try with this script:

Get-SPSite -Limit All | 
Get-SPWeb -Limit All | 
where { $_.HasUniquePerm -and $_.AssociatedOwnerGroup -ne $null } | 
foreach { 
$url = $_.Url; $title = $_.Title; $_ } | 
Select -ExpandProperty AssociatedOwnerGroup | 
Select -ExpandProperty Users | 
Select {$url}, {$title}, UserLogin, DisplayName | Export-csv c:\test.csv -notypeinformation
  • Ha! I could have sworn that I'd tried this. Thanks @Ransher – The Vanilla Thrilla Mar 27 '15 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.