Monday, May 14, 2012

Powershell - Bulk spdispose check


Script to bulk-rename all wsp's to cab:
dir *.wsp | Rename-Item -NewName {$_.Name.Replace('.wsp','.cab')}


Script to extract dlls from cab files:
get-childitem | foreach-object {Write-Host "Processing:"$_.Name; expand.exe .\$_.Name -f:*.dll "Path where all extracted dlls must be saved. Must end with \ ";  }




Script to perform dispose check and save log file for all dlls:
get-childitem "Path where all dlls are saved" | foreach-object {Write-Host "Processing:"$_.Name; .\spdisposecheck.exe $_.fullname }

No comments:

Post a Comment