PowerShell script to report the last modified date for all sites within a site collection

In response to a post on the Microsoft TechNet Forums I wrote the following script to report the last modified date for all sites within a site collection using the Get-SPSite and Get-SPWeb PowerShell cmdlets.

$SiteCollection = Get-SPSite https://yoursite.yourdomain.local
ForEach($Site in $SiteCollection.AllWebs)
{
   $Web = Get-SPWeb $Site.Url
   $LastModifiedDate = $Web.LastItemModifiedDate
   Write-Host "$Web was last modified on $LastModifiedDate"
}
[BlogBookmark] [Blogsvine] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [LinkedIn] [MySpace] [Reddit] [Slashdot] [StumbleUpon] [Twitter] [Windows Live] [Yahoo!] [Email]