Script in PowerShell per elencare i site administrator delle site collection di una Farm di SharePoint 2010

PowerShell: SiteCollectionAdminLists.ps1

# elenca i site administrator di ogni site collection della WebApplication
$url = "http://sharepoint"

$sites = get-spsite -WebApplication $url -Limit ALL
$sites | foreach {
	$w = $_.RootWeb
	write-host $w.Url -foregroundcolor green
	$w.SiteAdministrators | Select LoginName, Name | Format-table
}
da un output simile al seguente

Text

http://sharepoint
LoginName                               Name
---------                               ----
i:0#.w|domino\user1                     Paolino, Paperino
i:0#.w|dominio\user2                    De Paperoni, Paperon


http://sharepoint/sites/web01
LoginName                               Name
---------                               ----
i:0#.w|dominio\user1                    Paolino, Paperino
Tags:
PowerShell200 SharePoint498 SharePoint 2010224
Potrebbe interessarti anche: