I need to get the all site collection and subsite information. But for the properties , I need root site collection owner, subsite URL, subsite Name.
Get-SPWebApplication | Get-SPSite -Limit all | Get-SPWeb -Limit all | Select Title, URL, Owner | Export-CSV "path" -NoTypeInformation
This script does not give me primary site collection owner name.