Skip to content

Instantly share code, notes, and snippets.

@joerodgers
Created September 26, 2017 17:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joerodgers/43e5b6cc2e6133d3d7bc262a51faecb6 to your computer and use it in GitHub Desktop.
Save joerodgers/43e5b6cc2e6133d3d7bc262a51faecb6 to your computer and use it in GitHub Desktop.
Get SharePoint Migration Assessment Tool (SMAT) Unsupported Web Template SPWeb Details
$results = @()
Get-SPSite -Limit All | ? { -not $_.IsReadLocked } | Get-SPWeb -Limit All | ? { -not $_.IsAppWeb } | % {
if( $_.webTemplate -ne "STS" -and $_.WebTemplate -ne "SPSPERS" )
{
$totalItemCount = 0
# total the item counts in all the visible lists
$_.Lists | ? { -not $_.Hidden } | % { $totalItemCount += $_.ItemCount }
$results += [PSCustomObject]@{
Site = $_.Site.Url
Web = $_.Url
WebTemplate = $_.WebTemplate
LastItemModifiedDate = $_.LastItemModifiedDate
ListItemCounts = $totalItemCount
}
}
$_.Dispose()
}
$results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment