ĐÀO TẠO DOANH NGHIỆP : SỞ KHOA HỌC CÔNG NGHỆ TỈNH ĐỒNG NAI

ENTERPRISE TRAINING: DONG NAI DEPARTMENT OF SCIENCE AND TECHNOLOGY.

123

Friday, November 6, 2015

Sharepoint PowerShell List of all site collections in Web Application

$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 {...