Created
September 26, 2017 17:13
-
-
Save joerodgers/43e5b6cc2e6133d3d7bc262a51faecb6 to your computer and use it in GitHub Desktop.
Get SharePoint Migration Assessment Tool (SMAT) Unsupported Web Template SPWeb Details
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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