I'm building a PowerShell script to export a list of all the site collections in a particular web application.
So far I have this:
Get-SpWebApplication http://www.contoso.com | Get-SPSite -Limit All |
Select URL, ID, contentdatabase, owneralias,
secondaryowneralias | Export-CSV "f:\VLESites.csv" -NoTypeInformation
This creates a csv file at the specified drive location containing a list of site collection URLs, GUIDs and Content DBs within the stated web app. So far so good.
Unfortunately it doesn't display the primary and secondary owners of the site collections.
How can I modify this script to also display this ower information?