Skip to main content


Showing posts from 2014

Upload files and sub folder to SharePoint library from local folder using PowerShell

#Task performed in this PowerShell script.
#Replicate Local folder with subfolder and files in SharePoint document library
#Document Library for uploading files should be alresdy created
#Author : Satish R Gadekar
#Date   : 11/13/2014

Get current site web URL in JavaScript or JQuery

Use JavaScript variable name "L_Menu_BaseUrl" to get current web url and map it to any code in JavaScript.  This variable will be initialized on SharePoint pages by default. Below script will be always there when you do view source of the page:

<script type="text/javascript">
var L_Menu_BaseUrl="/ESearchCenter";
var L_Menu_LCID="1033";
var L_Menu_SiteTheme="";


You can make use of  below variables

1. var webUrl = _spPageContextInfo.webServerRelativeUrl;
2. var siteUrl = _spPageContextInfo.siteServerRelativeUrl;

Come out of PowerShell command more parameter edit mode

Some time in PowerShell we enter some command and keep asking for more input. The easy way to come out of more input prompt is Ctrl+C

Creating Site columns, Content type and List in Visual Studio 2012

1. Add three folders in solution as “SiteColumns”, “ContentType” and “CustomLists”

Step by step - Enable Form based authentication in SharePoint 2010 or SharePoint 2013 (step by step FBA / Claims based authentication)

Finally done :)

I was planning to implement and write a article with screen shots about claims from long time.

Follow below steps to enable Form based authentication in SharePoint 2010 or SharePoint 2013.

"An error has occurred" While exporting OOB CEWP (Content editor web part)

Today, I wanted to create a reusable content editor web part. So I thought of crating one and then exporting it and import lator.

But when i clicked on export button on Content editor. It thrown me error as below:

SPWeb Template details using Get-SPWebTemplate PowerShell command (STS#)

The command I ran in ISE is:


SharePoint 2010 central admin showing blank page

One of my team mate faced this issue few days back, After installing SharePoint 2010 when he tried to open central admin he got blank page.
We checked for all app pools and services but everything were fine, But after some googling we found solution that:
He forgotten to tick the Windows Authentication box when installing the IIS7 features. So:
Control Panel > Programs and Features > Turn Windows features on or off >Internet Information Services > World Wide Web Services > Security >tick ‘Windows Authentication’

After doing this our central admin was working as expected

SPDisposeCheck xsl for viewing xml output

XML Structure we get after running SPDisposeCheck command line:

After applying XSL:

How to get this:

SPDisposeCheck codes (Problem ID) table

ID Pattern SPDisposeCheckID_000 Unknown SPDisposeCheckID_100 Microsoft.SharePoint.SPList.BreakRoleInheritance() method SPDisposeCheckID_110 Microsoft.SharePoint.SPSite new() operator SPDisposeCheckID_120 Microsoft.SharePoint.SPSite.OpenWeb() method SPDisposeCheckID_130 Microsoft.SharePoint.SPSite.AllWebs[] indexer SPDisposeCheckID_140

Microsoft.SharePoint.SPSite.RootWeb, LockIssue, Owner, and SecondaryContact properties

Run SPDisposeCheck command line SharePoint

1. Run cmd as administrator
2. Navigate to SPDisposeCheck install path i.e. "C:\Program Files (x86)\Microsoft\SharePoint Dispose Check"
3. Run this single command for XML Output i.e.

SPDisposeCheck.exe “C:\FolderPath\Solution.dll” -xml “C:\FolderPath\output.xml“

You can find xml file at specified path.

Event Receivers vs Workflows SharePoint 2010

Event Receivers Workflows Can execute either before or after the operation Always executes after the operation Can cancel the operation Cannot cancel the operation as the item will have already been created Cannot be launched manually by the user Can be started manually by the user Not designed for user interaction Specifically designed for user interaction Can execute in response to many different actions, including deletes Can only execute in response to one of four events – Manual, an item being created, an item being edited, and an item being submitted for approval Must be created in Visual Studio Can be created with Visual Studio, Visio or SharePoint Designer

Workflows are mostly used for business process implementation and Event receivers are mostly used for one time activity based on trigger.

What is difference between Event Handler and Event receiver in SharePoint (Event Handler vs Event Receiver in SharePoint)

The below image answers the questions :

According to lot of articles on internet Event handler and Event Receiver are same. In SP2003 it was called as event handler and SP2010 it is called as Event Receiver.
But as per my understanding individual overridden method are called Event Handler and whole class is called Event receiver.
Comment out your thoughts on this.

How to find Windows Server 2008 license type