I've backed up over 200 sub sites and restored them to a new site collection with it's own content database. I want to do a quick compare of the document libraries to make sure nothing was missed.
I found the following that compares two lists, is there anything that compares two document libraries?
$oldReviewSite = Get-SPweb "http://portal.com/siteA"
$newReviewSite = Get-SPweb "http://portal.com/siteB"
$aList = $oldReviewSite.lists["Agenda"]
$bList = $newReviewSite.lists["Agenda"]
$arrA = @()
$arrB = @()
foreach($iA in $aList.Items)
{
$arrA += $iA["Title"]
}
foreach($iB in $bList.Items)
{
$arrB += $iB["Title"]
}
$c = Compare-Object -ReferenceObject $arrA -DifferenceObject $arrB -PassThru
Write-Host $c
I just need a simple PS script for now. I can expand it to iterate through the list of 200+ sites.