$xl=New-Object -ComObject "Excel.Application"
$xl.Visible=$True
$xl.Workbooks.Add()
$ws=$xl.ActiveWorkbook.ActiveSheet
$cells=$ws.Cells
$i = 1
$sites = Get-SPSite -Limit All -WebApplication http://pc362/
foreach ($site in $sites)
{
$cells.item($i,1)= invoke-command { $site.URL }
$cells.item($i,2)= invoke-command { $site.Owner.UserLogin }
$cells.item($i,3)= invoke-command { $site.SecondaryContact.UserLogin }
$cells.item($i,4)= invoke-command { $site.WebApplication.DisplayName }
$cells.item($i,5)= invoke-command {...