Question: 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?

Answer: 
Try to use [Owner](https://msdn.microsoft.com/EN-US/library/microsoft.sharepoint.spsite.owner.aspx) instead of `owneralias`, and [SecondaryContact](https://msdn.microsoft.com/EN-US/library/microsoft.sharepoint.spsite.secondarycontact.aspx) instead of `secondaryowneralias`.
simple:

```
Get-SpWebApplication http://www.contoso.com | Get-SPSite -Limit All |
Select URL, ID, contentdatabase,Owner, SecondaryOwner | Export-CSV "f:\VLESites.csv" -NoTypeInformation

```