How awesome would it be, If you could:
- Copy paste all the WSP’s that are installed in your farm into one directory
- Run a PowerShell script to unpack the content:
http://tomvangaever.be/blogv2/2012/12/unpack-wsp-packages-in-a-given-directory-by-powershell/ - Have all the assemblies that are inside the WSP packages checked by SPDisposeCheck:
http://tomvangaever.be/blogv2/2012/06/run-spdisposecheck-on-all-assemblies-in-a-specific-directory-with-powershell/ - Create one report by using this script to aggregate all results:http://tomvangaever.be/blogv2/2012/12/an-aggregate-view-of-all-spdisposecheck-results-files-as-csv-file-via-powershell/
In order to use this script, you need to have SPDisposeCheck installed on your machine, please download the free tool from here.
cls
Write-Host "**************************************************************************************************"
Write-Host "| This script will run the SPDisposeCheck tool on each dll that it finds in a provided directory |"
Write-Host "**************************************************************************************************"
Write-Host
$path = Read-Host "Directory path with the assemblies to check"
$Dir = get-childitem $path -recurse
$List = $Dir | where {$_.extension -eq ".dll"}
$export = $path+"\"+"SPDisposeCheck_$((get-date).toString('yyyyMMdd-hhmmss'))"
$dir = md $export
$List | ForEach-Object {
Write-Host $_.name "is beeing checked..."
$report = $export+"\"+$_.name+".spdisposecheck.txt"
& "C:\Program Files (x86)\Microsoft\SharePoint Dispose Check\SPDisposeCheck.exe" $_.fullname | Out-File $report
}
Write-Host
Write-Host "The reports are stored in "$export
Write-Host