Monday, August 27, 2012
Sunday, August 26, 2012
Bulk SPDisposeCheck
Handy powershell script for IT Pros to assist in bulk validating assemblies across multiple wsps for spdispose issues.
#########################################################################################################
$deploymentfolder = "C:\SharePoint Dispose Check\ToCheck\"
$workingfolder = "C:\SharePoint Dispose Check\working\"
$spdfolder = "C:\SharePoint Dispose Check\"
$cabfoldername = "cab"
$dllfoldername = "dll"
$wspfoldername = "wsp"
$logfilename = "log_"
#########################################################################################################
$dte = get-date -format MM_dd_yyyy_HH_mm_ss
$logfilename = $logfilename+$dte+".log"
function Pause()
{
Write-Host "Press any key to continue ...";
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown");
}
Write-Host "...Change working folder" -foregroundcolor yellow
pushd $workingfolder
Write-Host "...Cleaning working folder" -foregroundcolor yellow
Remove-Item $workingfolder"*" -recurse
#Pause
Write-Host "...Create new wsp folder" -foregroundcolor yellow
New-Item $workingfolder$wspfoldername -type directory
#Pause
Write-Host "...Copy all wsps to local from deployment folder" -foregroundcolor yellow
Get-ChildItem $deploymentfolder -filter "*.wsp" -recurse | Copy-Item -destination $workingfolder$wspfoldername
#Pause
Write-Host "...Create new cab folder" -foregroundcolor yellow
New-Item $workingfolder$cabfoldername -type directory
Get-ChildItem $workingfolder$wspfoldername | Copy-Item -destination $workingfolder$cabfoldername
Get-ChildItem $workingfolder$cabfoldername | Rename-Item -NewName { $_.Name -replace "wsp","cab" }
#Pause
Write-Host "...Create new dll folder" -foregroundcolor yellow
New-Item $workingfolder$dllfoldername -type directory
#Pause
Write-Host "...Expanding dlls from cab folder" -foregroundcolor yellow
Get-ChildItem $workingfolder$cabfoldername | foreach-object{expand $workingfolder$cabfoldername"\$_" -f:*.dll $workingfolder$dllfoldername}
#Pause
get-childitem $workingfolder$dllfoldername -recurse | ForEach {$_.Set_IsReadOnly($False)}
Write-Host "...Performing SPDispose check" -foregroundcolor yellow
pushd $spdfolder
Get-ChildItem $workingfolder$dllfoldername | foreach-object{.\SPDisposeCheck.exe $workingfolder$dllfoldername"\$_" | out-file -filepath $workingfolder$logfilename -append }
notepad.exe $workingfolder$logfilename
#Pause
#########################################################################################################
$deploymentfolder = "C:\SharePoint Dispose Check\ToCheck\"
$workingfolder = "C:\SharePoint Dispose Check\working\"
$spdfolder = "C:\SharePoint Dispose Check\"
$cabfoldername = "cab"
$dllfoldername = "dll"
$wspfoldername = "wsp"
$logfilename = "log_"
#########################################################################################################
$dte = get-date -format MM_dd_yyyy_HH_mm_ss
$logfilename = $logfilename+$dte+".log"
function Pause()
{
Write-Host "Press any key to continue ...";
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown");
}
Write-Host "...Change working folder" -foregroundcolor yellow
pushd $workingfolder
Write-Host "...Cleaning working folder" -foregroundcolor yellow
Remove-Item $workingfolder"*" -recurse
#Pause
Write-Host "...Create new wsp folder" -foregroundcolor yellow
New-Item $workingfolder$wspfoldername -type directory
#Pause
Write-Host "...Copy all wsps to local from deployment folder" -foregroundcolor yellow
Get-ChildItem $deploymentfolder -filter "*.wsp" -recurse | Copy-Item -destination $workingfolder$wspfoldername
#Pause
Write-Host "...Create new cab folder" -foregroundcolor yellow
New-Item $workingfolder$cabfoldername -type directory
Get-ChildItem $workingfolder$wspfoldername | Copy-Item -destination $workingfolder$cabfoldername
Get-ChildItem $workingfolder$cabfoldername | Rename-Item -NewName { $_.Name -replace "wsp","cab" }
#Pause
Write-Host "...Create new dll folder" -foregroundcolor yellow
New-Item $workingfolder$dllfoldername -type directory
#Pause
Write-Host "...Expanding dlls from cab folder" -foregroundcolor yellow
Get-ChildItem $workingfolder$cabfoldername | foreach-object{expand $workingfolder$cabfoldername"\$_" -f:*.dll $workingfolder$dllfoldername}
#Pause
get-childitem $workingfolder$dllfoldername -recurse | ForEach {$_.Set_IsReadOnly($False)}
Write-Host "...Performing SPDispose check" -foregroundcolor yellow
pushd $spdfolder
Get-ChildItem $workingfolder$dllfoldername | foreach-object{.\SPDisposeCheck.exe $workingfolder$dllfoldername"\$_" | out-file -filepath $workingfolder$logfilename -append }
notepad.exe $workingfolder$logfilename
#Pause
Monday, August 20, 2012
Claims setup - end to end
http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/OSP308
http://archive.msdn.microsoft.com/SelfSTS
http://sharepoint.mindsharpblogs.com/Paul/Lists/Posts/Post.aspx?List=4e549232%2D0409%2D4d83%2D9350%2D63247ef95e8c&ID=54
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/OSP308
http://archive.msdn.microsoft.com/SelfSTS
http://sharepoint.mindsharpblogs.com/Paul/Lists/Posts/Post.aspx?List=4e549232%2D0409%2D4d83%2D9350%2D63247ef95e8c&ID=54
Subscribe to:
Posts (Atom)