Use PowerShell to get the detailed infomation about error by Correlation ID in SharePoint 2010

When you have error in SharePoint 2010 you are provided with Correlation ID that identify that error.


That correlation Id represent information collected across multiple servers (WFE, Application and etc) maintaining the integrity of the request. SharePoint 2010 logging provides you multiple ways to get the detailed information about that error:

  1. ULS logs have a very useful new column called the Correlation ID. The ID tracks a request and greatly simplifies finding detailed error logging in SharePoint trace logs.
  2. WSS_Logging database contains the Collelation ID field to track the entries related to the specific error

To simplify getting the detailed error message for the CorrelationUD SharePoint team provides us the PowerShell extension for that. You can use the following command to retrieve the message from log

Get-SPLogEvent | ?{$_.Correlation -eq "<ID>"}

How to install Sharepoint foundation 2010 on Windows 7 home edition

Finally! I installed Sharepoint foundation 2010 on my Windows 7 home edition. It took me a while but i did it!

Here are quick steps and what i encountered

1. Download SharePoint foundation 2010.
Modify the webconfig as described in Step 2 of this Microsoft article.
2. Now change the IIS setting as described in Figure 2 of the above article.
3. Install the ADO.NET Data Services Update for .NET Framework 3.5 SP1
5. Install WCF Hotfix for Microsoft Windows 7.
6. Since you cannot run PrerequisiteInstaller.exe on Windows 7 you will have to install the components manually

7. Noe run the setup.exe.
8. Once done run the configuration wizard.
9. After the configuration wizard completes you would most probably get a blank Page for your central admin site. To fix this see How to fix the blank Page on Central administration site after installing SharePoint foundation 2010 on Windows 7 home edition

How to create wsp from ddf and copy it to 12 hive bin on Project build – SharePoint 2007

If you want to create a .wsp or solution file from your ddf and also add it to 12 hive’s Bin folder all when you build your project, all you need to do is write some commands in .Bat file and add it to the project build events.

So the Steps would be

1. Add a new file with .Bat extension, for e.g. Setup.Bat in your project.
2. Add the following in your .Bat file

@SET MakeCabTool=makecab.exe
@SET DESTDIR=”C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”
@SET SPAdminTool=%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
if EXIST Package\%WSP%.wsp del Package\%WSP%.wsp
“%MakeCabTool%” /f {DDF FILE.DDF} /D CabinetNameTemplate=Package\%WSP%.wsp
if EXIST Package\ del Package\
“%MakeCabTool%” /f {DDF FILE.DDF} /D CabinetNameTemplate=Package\
XCOPY /r /y Package\*.wsp %DESTDIR%

3. Once done, set the BuildEvents in project properties like below