Aug 17, 2013

Migrate SharePoint 2010 to 2013


In this article, we will learn how to migrate SharePoint 2010 to SharePoint 2013. This migration is applicable for OOTB features migration not for Custom Solution migration to SharePoint 2013.
Steps:
      1. Change the Authentication mode of SharePoint 2010 application to Claims using the PowerShell command
$WebAppName = ""
$account = ""
$wa = get-SPWebApplication $WebAppName
Set-SPwebApplication $wa AuthenticationProvider (NewSPAuthenticationProvider) Zone Default
2.   We have to take the backup of solutions (WSP) from SP 2010 and deploy it in the SP 2013 farm. Use the following PowerShell command to back up the WSP
$farm = Get-SPFarm
$file = $farm.Solutions.Item("Backup.wsp").SolutionFile
$file.SaveAs("C:\Backup.wsp")
3.   Now, deploy the solution to the SP 2013 farm using the following command:
Add-SPSolution -LiteralPath "C:\Backup.wsp" 
(rebuilding the solution in Visual Studio 2012 is required sometimes)
     4.  Now take the backup of Content DB from SP 2010 and attach in SP 2013 database server
Note: This will automatically update the DB schema for SQL server 2012 (which is previously lower version in SP 2010)
    5.   Create a new web application in SP 2013 and after creating the web application detach the Content DB (which is newly created for SP 2013 now)
    6.   Now, attach the backup Content DB (taken from SP 2010) using the following command
Mount-SPContentDatabase -name -WebApplication 
Note: This will automatically update the Dictionary and other required update for SP 2013.
    7.   Now deploy the List templates and other backups from SP 2010 if required.
Note: This is applicable only for OOTB solutions. If you have custom solutions, then you have to re-build the code using Visual Studio 2012 and then deploy the solution.
Hope this helps you and please free to comment and share this post.

Aug 7, 2013

Create Custom Page Layouts in SharePoint 2013

In this article we will learn how to create Custom Page Layouts for SharePoint 2013. Like SP 2010, we can create Custom Page Layouts in SharePoint 2013 using Visual Studio 2012 and Microsoft SharePoint Designer 2013 either from the scratch or by using the existing Layouts.

New in SharePoint 2013:
In SharePoint Designer we have a new feature called “Design Manager” (under Look and Feel) where we can create a Custom Layout. Once created, it will be available in the Page Layouts Gallery.

Steps:
1.   Navigate to Site Settings -> Look and Feel -> Design Manager
   2.   Under Design Manager Click on 6. Edit Page Layouts -> you have an option to “Create a page Layout” and then create it.


  3.   When the Layout is created, it is available in Edit Page Layouts (under Look and Feel -> Design Manager) and in Master pages and page layouts (under Web Designer galleries)


  4. In the Master pages and page layouts section, you will see two files created for the layout created. .aspx and .html files”
  5.  For editing the layout page, either you can download the HTML page from the Layouts Gallery or edit the HTML files in the SharePoint Designer
    Note: No Changes should be made to .aspx file in the layouts gallery.
  6.  Once the changes are made in the HTML file, upload the updated HTML file to the gallery so that the .aspx file updated automatically.
  7.   Check in and Publish the created layouts 

  8. Now, create pages (Site Settings -> Pages -> Create Page using New Document -> Page and select the Custom Page Layout which is created) 
Hope this helps you!

Jul 22, 2013

Creating Master Page with HTML Templates in SharePoint 2013

SharePoint 2013 has many new and improved design features for designing and branding it. In SP 2013, a new concept called Design Manager has been introduced where all the site branding is managed. The following article explains the step by step process of converting HTML Master Pages for using Design Manager and using the converted Master Page for the site collections.

Steps:
     1.   Create a Site Collection using Central Administration
     2.   Go to the Site Settings -> Enable SharePoint Publishing Feature in Site Collection Feature (Site Collection Administration -> Site Features) and Site Features level (Site Actions -> Site Features) as shown below:


    3.   Go to Site Settings -> Web Designer Galleries -> Master Pages and Page Layouts
    4.   I have created a folder called Custom Master Page inside the Master Pages and Page Layouts Folder and uploaded the HTML, CSS, JS, Images in the folder
    5.   Now navigate to Site Settings -> Look and Feel -> Design Manager -> Edit Master Pages -> Click Convert an existing HTML to Master Page 
  6.   Once converted you will see the converted Master Page in the List with the status Conversion Successful and make sure it is approved and published.
    7.   Now navigate to Site Settings -> Look and Feel -> Page Layouts and Site Templates select the Custom master Page created and use it for the site collection.
For branding in SP 2010 we need good web designing skills (HTML, CSS and JS). But in SP 2013 it has made very simple and easy! 

Jul 8, 2013

Audit Logging in SharePoint 2013

Audit Logging gives the following information in Site Collection:

  1. Opening or downloading documents, viewing items in lists, or viewing item properties
  2. Editing items
  3. Checking out or checking in items
  4. Moving or copying items to another location in the site
  5. Deleting or restoring items
  6. Editing content types and columns
  7. Searching site content
  8. Editing users and permissions
Below are the steps to achieve:                                                                 
       1. Go to Central Administration -> Manage Service Applications


    2. Choose Secure Store Service 
 

    3. Then Click on the Properties in the Ribbon
4. In the Enable Audit option Select the Check Box Audit Log Enabled (the default value is 30 days and it can be changed)
5After enabling the Audit Logging in Central Administration, we have to configure the audit settings at the site collection level and below are the steps:
Go to Site Settings -> Site Collection Administration -> Site Collection Audit Settings 
Under this settings, select the settings as shown below:

 Now, Audit Logging is configured for the site and now you can view the following types of Reports.
Checking the Reports Generated for the Site Collection
Go to Site Collection Administration -> Audit Log Reports
Once you click on any reports, it will ask for the Report Save location. Select any of the Libraries to store the Report.
Example Report Generated Screenshot:
 
 Select an Library to store the Report and Click OK
Report Generated in Excel

Hope this article helps you in understanding the Audit Logging in SharePoint 2013. Please feel free to share and comment about this post if it helps you.

Mar 19, 2013

Unexpected error occurred while communicating with Administration Service

Scenario:
I ran into the following issue when attempting to access  Fast search features such as:
1. FAST Search keywords
2. Fast Search site promotion and demotion
3. Fast search user context

Solution:
I checked my Administrators group in the SP server. Fast Search ADMIN account configured is added in the Administrators group. Though I am unable to access these features.
Then found the resolution from a TechNet article.
1.   Create a group named FASTSearchKeywordAdministrators in the SP server (this group is not automatically created during default installation).
2.   Add the Fast Search ADMIN account (account configured for fast search) to this group.
Then tried accessing the features and everything works as expected.

Mar 2, 2013

Sign in as different user in SharePoint 2013

In all the versions of SharePoint, we have option for signing in as different user which helps us in various scenarios. Also, it helps in testing purposes.
But in SharePoint 2013, we do not have this option. 

In this article we will know how to achieve this:

1. When you log in to a SharePoint site, you don't have sign in as different user option which is shown as below:

2. To overcome this limitation either we have to sign in to the IE as different user and then we can log in to the SharePoint site as different user.
3. To achieve this in SharePoint (which is like option in older versions of SharePoint), we need to modify the welcome.ascx which is present in the 15 hive of SharePoint server.
4. Navigate to the below path and find the welcom.ascx file.
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES
5. Open the file in the visual studio or in the notepad and add the following code above the tag which has ID_RequestAcess as shown below:

<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser" Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
MenuGroupId="100"
Sequence="100"
UseShortId="true"
/>

 6. Save the file and now refresh the site, you will see the SharePoint page with option "Sign in as different user" option as shown below:


 Hope this helps you. Please free to comment. It helps me to write more.

Snipping Tool in Windows Server 2012

Snipping tool is very nice tool for capturing the screens which comes with latest versions of Windows. In this article lets see how to enable the snipping tool in Windows Server 2012.

Snipping tool is not installed in the default installation of Windows OS. We have to enable it manually.

Steps:
1. Go to Server Manager -> Manage Features -> Features -> Select DESKTOP EXPERIENCE under user interfaces and infrastructure -> Next -> Feature will be installed and it will ask for restarting the server.
2. Restart the server and log in to the server. Under Windows accessories you will see the Snipping tool installed.
Screenshots for reference:




Hope this helps you!

Feb 26, 2013

Jan 7, 2013

The feature being activated is a Site scoped feature which has a dependency on a Site Collection scoped feature which has not been activated. Please activate the following feature before trying again: SharePoint Server Publishing Infrastructure f6924d36-2fa8-4f0b-b16d-06b7250180fa

Some times while activating the Publishing feature in SharePoint through the options in Site Settings we will get this error:
The feature being activated is a Site scoped feature which has a dependency on a Site Collection scoped feature which has not been activated. Please activate the following feature before trying again: SharePoint Server Publishing Infrastructure f6924d36-2fa8-4f0b-b16d-06b7250180fa

Reason:
The reason being the "SharePoint Server Publishing Infrastructure" feature has to be enabled at SITE COLLECTION level, then it has to be activated at SITE LEVEL enable the feature. So that we can create Publishing pages in SharePoint.

Solution:
It can be done in many ways (2 ways mentioned below):
1. We can use the Site Settings -> Site Collection Administration -> Site Collection Features to enable this feature.
2. Then Site Settings -> Site Administration -> Site Features -> Enable this feature.
3. We can also achieve this using STSADM command as shown below:
STSADM.EXE -o deactivatefeature -id f6924d36-2fa8-4f0b-b16d-06b7250180fa -url "http://SiteURLHere/" -force
Then,
STSADM.EXE -o activatefeature -id f6924d36-2fa8-4f0b-b16d-06b7250180fa -url "SiteURLHere" -force
Hope this helps you!

Export SharePoint Group to Excel using PowerShell

$siteUrl="SiteURLHere"
$groupName="GroupNametoExport"
$Output = @("GroupName|Name|Login|Email|Department|Title")
$web = Get-SPWeb $siteUrl
$site = $web.Site
$rootWeb = $site.RootWeb
$UserList = $rootWeb.Lists["User Information List"]
$web.SiteGroups[$groupName].Users|%{$user = $UserList.GetItemById($_.ID)
if($user -ne $null)
{
$JobTitle = $user["JobTitle"]
$Department = $user["Department"]
}
$Output += ($groupName+"|"+$_.Name+"|"+$_.UserLogin+"|"+$_.Email+"|"+$ Department +"|"+$JobTitle)
}
$rootWeb.Dispose()
$web.Dispose()
$site.Dispose()
$Output > "D:\MembersExport.csv"