Thursday, June 16, 2011

Listing sites, their creators, template and date created

Just a simple Powershell script using the splat operator (which is quite new to me).


(Get-SPSite myurl).AllWebs | Select-Object url, @{label="Creator"; Expression={$_.Author}}, @{label="Template"; Expression={$_.WebTemplate}}, @{label="Date Created"; Expression={$_.Created}} | Format-Table -AutoSize


This returns a table of URL, Creator, Template and Date Created of each site in the site collection specified by myurl. Note that your screen needs to be wide enough to see the whole table otherwise some columns may not display.

No comments:

Post a Comment