About Me

My photo
Muthupet, TamilNadu, India
SharePoint 2010

Friday, July 9, 2021

Create a Team From Existing SharePoint Online Modern Team Site Using PowerShell

How to create a team in Microsoft Teams from an existing SharePoint Online modern team site (connected to Office 365 group) using PowerShell.

 
I have created a modern team site (connected to an Office 365 group) and created multiple document libraries and lists in the site. I want to create a Team in Microsoft Teams using this site so that files will be shared in this SharePoint site instead of creating a new site and also, I can have the same site structure (document libraries, lists etc.) which was already created.

  1. # Input Parameters  
  2. $siteURL="https://c986.sharepoint.com/sites/ukcommunicationsitedemo"  
  3. $tenantURL="https://c986-admin.sharepoint.com"  
  4. $credential = Get-Credential  
  5.  
  6. ## Connect to Microsoft Teams  
  7. Connect-MicrosoftTeams -Credential $credential  
  8.  
  9. ## Connectto SharePoint Online Service  
  10. Connect-SPOService -Url $tenantURL -Credential $credential  
  11. $site = Get-SPOSite -Identity $siteURL  
  12.  
  13. ## Create a new Team  
  14. New-Team -GroupId $site.GroupId.Guid   

Wednesday, December 23, 2020

Onedrive not provision new O365 user

As we have checked the the users Onedrive is not getting provisioned.

Hence would request you to check the below commands to provision the Onedrive and ask any Global admin to run the commands.

Connect-sposervice
Request-SPOPersonalSite -UserEmails $useremailid@domainname.com

Sunday, May 3, 2020

Take ownership over My Sites / Personal site SharePoint Online

Add an Administrator account (or, for example, Company Administrator group) into Site Collection Administrators list for each of Personal (i.e. My) Sites at SharePoint Online instance.

Under the SharePoint Online tenant admin portal, you can go to User Profiles -> Setup My Sites. From here, you can add additional owners to new My Sites and set the secondary owner of the site collection when it is deleted. As noted above, this would only apply the admin settings to new My Sites after the settings are applied.
Adding an additional admin after the site is created is a little trickier but can be done by the tenant administrator. 
The SharePoint Online PowerShell Management suite should be good enough to handle this task.
$tenant = "contoso"    
$site = "user1_contoso_com"  
$user = "admin@contoso.onmicrosoft.com"  
Set-SPOUser -Site https://$tenant-my.sharepoint.com/personal/$site `
    -LoginName $user -IsSiteCollectionAdmin $true

Tuesday, June 18, 2019

Nintex Workflow Not responding

I found the below solution to clear the workflow history

Here are the scripts we need to test in the test environment that will clear the workflow history.  In production I want to clear everything before January 1 2018.  We can be more aggressive than that in test. 

The only thing I ask is that we do not run this against Global Accounting in test.  I need to make sure they are no longer using this data for auditing purposes. 

The production scripts will need to be run off working hours. 

This make take a few days to complete for each site collection.


NWAdmin.exe –o PurgeHistoryListData -siteUrl <site collection URL> -lastActivityBefore 2018-01-01 00:00 -state COMPLETED

NWAdmin.exe –o PurgeHistoryListData -siteUrl <site collection URL> -lastActivityBefore 2018-01-01 00:00 -state CANCELLED??????????????

NWAdmin.exe –o PurgeHistoryListData -siteUrl <site collection URL> -lastActivityBefore 2018-01-01 00:00 -state ERROR

Cloud Collaboration

Exchange Online:

Exchange now support 150MB email message,
It's quite increase from previous limit as 35MB. But so as to user that
Kind of big size email in the actual environment we have lost of consideration
About their laptop performance, receiver's message inbound limit etc..

we can user Set-MailboxPlan and maxsendsize and maxreceivesize

Get-MailboxPlan | f1 name, maxsendsize, maxreceivesize, isdefault

Set-MailboxPlan ExchangeonlineEnterprise -ezoxx
-MaxsendSizw 10MB -MaxReceiveSize 10MB


Recover – Powershell
Get-mailbox -SoftdeletedMailbox

to get GUID (Mailbox GUID)

deleted get-mailbox -SoftdeletedMailbox -identity MBName | f1 'guid'

I plan to move this mail box to new mailbox

active get-mailbox -identity NEWMBname | f1 'guid'

get GUID for active and deleted mail box

New-MailboxRestoreRequest -SourceMailbox 'guid'
 -TargetMailbox guid -AllowlegacyDNMsmatch

----------------------------------------------------------------------------

Teams:

Teams in one of the communication platform in off 365.
Chat chat with team members (Managing complex project .. across the world we can work effectively
Groups Create own group or teams (creating groups rather than email) it will more powerful for our internal communication make a quick decision easily
Messages Calender's schedules and meetings notification
Files One drive file / team files
Teams are backed by O365 Groups, so when you create a team, you create a group. There are a set of cmdlets provided for operating on the core team and its settings (new-team, get-team, set-team), managing team users (add-teamuser, remove-teamuser), as well as cmdlets for managing the channels of the team (new-teamchannel, remove-teamchannel). All of these cmdlets can be run as end users, but they'll work only on the teams that you own or are a member of. If you are a Global Admin or Teams Service Administrator, you'll be able to act on all teams in your organization.
Channel get email id from channel and paste it outlook, it'll email shows in a team
Book mark and save the item, and add flag for that
Connector we use this connector to connect News, Twitter, Trello and facebook
Recording / Transcripts we can recording the teams voice, also we can transcripts the recording voice's to English and spanish
when you recorded your video, more open in microsoft steam and go to the edit option and under video languages and select English and select autogenarate caption file
Ex Powershell
New-Team
   -DisplayName <String>
   [-Description <String>]
   [-MailNickName <String>]
   [-Classification <String>]
   [-Visibility <String>]
   [-Template <String>]
   [-Owner <String>]
   [-AllowGiphy <Boolean>]
   [-GiphyContentRating <String>]
   [-AllowStickersAndMemes <Boolean>]
   [-AllowCustomMemes <Boolean>]
   [-AllowGuestCreateUpdateChannels <Boolean>]
   [-AllowGuestDeleteChannels <Boolean>]
   [-AllowCreateUpdateChannels <Boolean>]
we can add all o365 apps / and private app to teams..    [-AllowDeleteChannels <Boolean>]
   [-AllowAddRemoveApps <Boolean>]
https://www.youtube.com/watch?v=_Cw9uXfgTLQ    [-AllowCreateUpdateRemoveTabs <Boolean>]
   [-AllowCreateUpdateRemoveConnectors <Boolean>]
Powershell step by step    [-AllowUserEditMessages <Boolean>]
https://blogs.technet.microsoft.com/skypehybridguy/2017/11/07/microsoft-teams-powershell-support/    [-AllowUserDeleteMessages <Boolean>]
   [-AllowOwnerDeleteMessages <Boolean>]
   [-AllowTeamMentions <Boolean>]
   [-AllowChannelMentions <Boolean>]
   [<CommonParameters>]

SharePoint Online:


https://www.youtube.com/watch?v=rEy2mlFVWa4
http://powershell.office.com/get-started
Download the SharePoint Online Powershell
open windows ps as admin Best practices
Start-Transcript (entire transcript stored one text file c:\users\grant\doucuments\powershell_transcritps...txt) most use full to review
Get-ExecutionPolicy
Set-ExecutionPolicy RemoteSigned and say Y yes
cls
$credentials=get-credential enter credential
Azure:
Import-Module MSOnline
Connect-MsolServices -Credential $credential then test Get-MsolUser to show all the users [ to get all the command Get-Command -Module MSOnline ]
Skype:
SP
Import-Module LyncOnlineConnector Install-Module SharePointPnPPowershellonline
$lyncsesstion = New-CsOnlineSession -Credential $credential (Create session)
and Import-PSSession $lyncsesstion
SharePoint:
Import-Module Microsoft.Online.SharePoint.Powershell if any Warning user -DisableNameChecking..
then
Connect-SPOService -url https://adm.sharepoint.com -Credential $credential then test Get-SPOSite
Exchange Online:
test
Get-command -Module -tmp (tab)

Wednesday, May 15, 2019

Sharepoint Voice Search


Ever thought of implementing an shopping app like voice search in your Sharepoint site as a part of search? This neat little trick can help you achieve just that.

In the not so recent past, I was asked to improve a Sharepoint site by adding functionalities to it and keeping it up to date with the most recent trends. Voice search was one functionality that immediately came to my mind. When I found out that Microsoft did not offer it out of box, I jumped on the opportunity.

What I did here was convert the functionality into two parts. i.e. a) Voice to text conversion and b) Redirection after voice search.
Both of which were simple to achieve. For part a) , I implemented the voice to text webkit which is readily available in this link: https://tutorialzine.com/2017/08/converting-from-speech-to-text-with-javascript

The webkit allows you to start and stop recording and also auto stop if you want to specify a time period. I went ahead with auto stop and hooked the text thus converted with a redirect to the Sharepoint search page with the text as q query in the query string. i.e.https://xyz.sharepoint.com/sites/sp2013/search/pages/results.aspx?k=(Voice to text converted text)
Then its just a matter of hooking up the search functionality to the Sharepoint search box via the javascript that contains your webkit functionality. You can add a fancy mic like logo as a button for your voice search and add it inside the search box or outside.

For modern sites in Sharepoint Online we could go with creating an spfx webpart and implementing the same or creating a script editor webpart in spfx, adding it to the site and then pasting the script in the script editor (considering the site is not in "no script" enviroment).

Cheers!

Tuesday, June 26, 2018

Remove orphaned Site Collection URLS with no refrence to Content Database

During the Migration or Patching..

These sites assumes that content database got removed manually and site collection entries remains in config db. you need to type your corrupt site collection names in below $CorruptSites separated by comma in below script block and run as administrator in PowerShell.

This will fully remove referred site collection from Farm.

Add-PSSnapin Microsoft.SharePoint.PowerShell $CorruptSites = "http://rk-sps.com/sites/a","http://rk-sps.com/sites/b" Function DeleteCorruptSite { param($CorruptSite) Write-Host $CorruptSite : -foreground red $site = Get-SPSite $CorruptSite $siteId = $site.Id $siteDatabase = $site.ContentDatabase $siteDatabase.ForceDeleteSite($siteId, $false, $false) Write-Host --Deleted from Content DB -foreground green } foreach ($CorruptSite in $CorruptSites) { DeleteCorruptSite $CorruptSite }

Tuesday, June 12, 2018

Working with Request Manager in SharePoint 2013

 RM rules are applied per web app, just like throttling is done in SharePoint 2010. 

At a high level, the goals of RM are this:

RM can route to WFEs with better health, keeping low-health WFEs aliveRM can identify harmful requests and deny them immediatelyRM can prioritize requests by throttling lower-priority ones (bots) to serve higher-priority ones (end-users)RM can send all requests of specific type, like search for example, to specific machinesIsolated traffic can help troubleshoot errors on one machineRM can send heavy requests to more powerful WFEs

Routing and throttling rules are implemented like this:

Routing rules route requests and are associated with MachinePoolsMachinePools contain serversServers use weights for routing – static weights and health weightsStatic weights are constant for WFEs; health weights change dynamically based on health scores

Okay, so that’s the basic overview of what they are – there should be other documentation on TechNet if you want more details on the features and use for RM.  If you’re reading this, I’m assuming you know enough about it (or are curious enough about it) that you want to actually do some work with it.  So I’m just going to throw down some PowerShell here to help get you started.  These are cmdlets that I’ve found useful when working with RM.  The basic process you go through is something like this:

Get a reference to the SPWebApplicationGet a reference to the request management settings for the web applicationCreate one or more criteriaA request must match ALL criteria for a rule in order to match the rule (i.e. they are AND’d together)Get a reference to a machine pool, or create a new one if neededAdd the rule

Let’s walk through an example now:

#Get a reference to the SPWebApplication
$w = Get-SPWebApplication -identity http://foo

#Get a reference to the request management settings for the web application
$rmset = $w | Get-SPRequestManagementSettings

#Create one or more criteria
$criteria = New-SPRequestManagementRuleCriteria -Property Url -Value “.*\.docx” -MatchType Regex

#Get a reference to a machine pool, or create a new one if needed
$mp = Add-SPRoutingMachinePool -RequestManagementSettings $rmset -Name MyRulePool -MachineTargets ($rmset | Get-SPRoutingMachineInfo -Name WFE1)

#Add the rule
$rmset | Add-SPRoutingRule -Name “Word Doc Rule” -Criteria $criteria -MachinePool $mp

Let’s look at that routing rule now:
$rr = $rmset | Get-SPRoutingRule -Name “Word Doc Rule”

#see the criteria
$rr.Criteria

#change the expiration date and time of the routing rule
$rr.Expiration = “12/25/2013 5:00:00 PM”

There you go – now you have a routing rule.  Creating a throttling rule is very similar:

#Add a new criteria rule that looks for OneNote requests.  It can do this by examining the UserAgent in the request and looking for the header that OneNote uses.
$criteria = New-SPRequestManagementRuleCriteria -Property UserAgent -Value “.*Microsoft Office OneNote 2010*” -MatchType Regex

#Add a throttling rule that uses the criteria rule when the server health reaches a score of 8.  
#Note that throttle rules apply to the entire web application, #not to individual machines so you don’t 
#use a machine pool with it.
$rmset | Add-SPThrottlingRule -Name “OneNote Throttle Rule” -Criteria $criteria -Threshold 8

#now view all routing rules for the web application
$rmset.RoutingRules

#View all of the throttling rules
$rmset.ThrottlingRules 

 

Let’s look a little deeper at working with Machine Pools now:

#Get all routing machines that are available
Get-SPWebApplication | Get-SPRequestManagementSettings | Get-SPRoutingMachineInfo -Availability Available

#Get every machine in a specific pool
Get-SPWebApplication | Get-SPRequestManagementSettings | Get-SPRoutingMachinePool -Name yourPoolName | % { $_.MachineTargets} | Format-Table

#Add machine WFE1 to every machine pool for a particular web application; a million thanks to Tyler who helped me with this one – I ain’t a PowerShell guy really
$a = Get-SPWebApplication -Identity http://contoso
$b = $a | Get-SPRequestManagementSettings | Get-SPRoutingMachineInfo -Name WFE1
Get-SPWebApplication | Get-SPRequestManagementSettings | Get-SPRoutingMachinePool | % { $_ | Set-SPRoutingMachinePool -machinetargets ($_.machinetargets + $b) }

#Add machine WFE1 to a specific pool
$a = Get-SPWebApplication -Identity http://contoso
$b = $a | Get-SPRequestManagementSettings | Get-SPRoutingMachineInfo -Name WFE1
$pool = $a | Get-SPRequestManagementSettings | Get-SPRoutingMachinePool -Name yourPoolName
$pool | Set-SPRoutingMachinePool -MachineTargets ($pool.MachineTargets + $b)

#Remove WFE1 from every machine pool
Get-SPWebApplication | Get-SPRequestManagementSettings | Get-SPRoutingMachineInfo -Name WFE1 | Remove-SPRoutingMachineInfo

Okay, there you have it folks.  That should give you plenty to start working with.

Thursday, June 8, 2017

5 Best SEO Practices for SharePoint sites

Getting your sites ranked in Google would mean tons of traffic, tons of leads. It is only how you convert them. SEO has always been hot getting sites climb up in Google. But what about SharePoint sites? Does it support SEO Features ?


You may have a stunning website, but if that doesn’t rank for competitive keywords your business simply doesn’t exist. Optimizing your website for Search Engines is a skill every company should own.
SEO features supported by HTML, WordPress etc. has a long history. How about ranking SharePoint sites? Does SharePoint offer SEO friendly features? How to rank SharePoint sites? This is a post to answer that.
SharePoint has now a lot of inbuilt features that help with SEO. With the new enhanced SEO-friendly features of SharePoint, optimizing SharePoint sites is now easy. Here is a list of best SEO practices for SharePoint sites.
Specify SEO properties on all publishing pages
Here is how you set it up.
1. Click PAGE tab -> Edit Properties -> Edit SEO Properties
2. Specify a Browser Title (equivalent to the TITLE tag in case of a HTML site)
3. Meta Description
4. Meta Keywords
5. Specify if you would like to exclude the page from search results (something similar to what you do with ROBOTS.TXT)

SharePoint SEO
Make effective use of ‘Canonical’ URLs
If the same webpage is indexed under different URLs (this happens with dynamic pages) that may harm your SEO efforts. Google and other search engines will not feel great about ranking such pages. Every single page should be indexed under one unique URL only. The solution? Canonical URLs.
SharePoint Server 2013 and upwards will automatically generate canonical URLs. Just activate the Search Engine Optimization Site Collection Feature on the SEO Settings page. Once you do that the meta tag rel= ‘canonical’ will be rendered in the HTML of your page automatically as shown below.

Configuring XML Sitemaps
XML sitemaps are by which Search Engines know about your webpages. So, it is better to keep your XML sitemaps updated always. With SharePoint, you no longer have to worry about manually updating your sitemaps. That is indeed a tedious and time consuming process. Thanks to SharePoint Server 2013 and above where automatic XML sitemap creation works like a breeze.
Activate the Search Engine Sitemap Site Collection Feature. The Search Engine sitemap job by default runs once daily and updates XML sitemap with all new pages you have put in your site. You can of course customize the schedule to fit your requirements closely.
Robots.Txt File
If you have a lot of pages, you can specify to exclude few pages that are not required to be ranked. For example, a payment gateway page or your product delivery page should not be indexed or ranked. Specify such pages in Robots.Txt file for exclusion and any search engine would never crawl those pages.
It also helps in optimizing the ‘crawling time’ search engine robots spent with your site. Search Engines don’t have much time to spend on your site either. So, keep it clean with Robots.txt file exclusion settings.
Sharepoint seo robots
Friendly URLs
If there is control over the URLs to optimize them for search engines will it not look wonderful? SharePoint Server 2013 brings that awesomeness. URLs definitely have a huge influence in getting your pages ranked in search results. SharePoint comes with a Friendly URLs that are really friendly (at least on a SEO perspective)
By using the Managed Navigation method, you can use the SharePoint Managed Metadata Service to model the navigation hierarchy of your website through taxonomy terms. For each term, you can specify a search engines optimized title and URL.
sharepoint SEO Friendly URL

Follow these 5 best practices and you will have a SEO friendly SharePoint site ready to rank and dominate the search engines

Wednesday, June 7, 2017

SharePoint 2013 site Slowness issue


I was about to give up on one of my labb SharePoint 2013 Environments because it was so extremely slow all the time.
Warmup scripts, reloads, more memory, more CPU, stopping services, stopping search…nothing helped.
I had a constant loadtime of all aspx pages of 6+ seconds, 6.10-6.20 something. Even when the page was just loaded and I pressed F5 to reload, it still took 6.10 seconds.
This was an environment that gave you sensitive nerves…
So, after looking for any solution or more like looking for the little issue that caused this all day, I gave up more or less.
– CPU was at a maximum 40% on SQL, SharePoint cranked it up to 18%…
– Memory consumtion was at 25% of the 12GB SharePoint had…
– SQL was Lightning fast to all other SharePoint farms…
– Network utilization showed about 100Kbps at the most…
I scavenged the internet as usual and found nothing but the standard: add more memeory, add more CPU, stop services, stop search…
None of that helped and I had tried it all…
Then…when all hope was lost, I got on a call with my excellent SharePoint buddy Mattias Gutke, we talked about the issue, his server on a laptop with SSD disks showed 50-100ms loadtime of all pages, reload did nopt even produce a flicker…
Then as often happens, we came to discuss the Distributed cache service, what it did and why it was there and so on…I had already had a look at it but could not find any reason why a default cache would give me this lousy performance. Then, I had a look at the timestamp in the F12 Developer dashbord – Network tab – Start capturing. I saw the home.aspx load and it took the usual 6.10 seconds.
The timestamp could be found in the detailed view and on the response header.
I memorized the timestamp (that was in GMT timezone) and opened up my ULS log. In the log at the exact time of the response header, I saw errors from the distributed cache.
ULS1
I decided that t-shooting the distributed cache would have to wait, it was getting late…but, before disconnecting the Lync call with Mattias, we decided to try and see just what would happen if I stopped the distributed cache service and loaded the page.
Said and done:
CA1x
Now, loaded the same site:
F12-2x
Whit the Distributed cache service running:
F12-1x
Notice any difference? Now my SharePoint farm is Lightning fast!!! From 6.10 seconds down to 79 ms!
Why is this so then you ask? No idea, something misconfigured or perhaps this is standard when using a single SharePoint server…anyway, today I don’t care.
Stop the service and the performance is great!
Hope this may help you as it did me!

Resolve SharePoint/ IIS Site Slow Initial Load Issue

There are two ways you can improve the initial load time of a SharePoint/ IIS site:
  • Setting application pool's start mode to AlwaysRunning from OnDemand. 
    Open IIS, select application pool of your site, go to Advanced Settings and then set start mode to AlwaysRunning).

    setting

    By setting the above option, your site/application loads fast all the time except the very first load after IIS Reset.
  • Every Application's/ Site's application pool recycling is set at a specific time or regular intervals. To overcome the issue of first load, IIS 8.0 has Application Initialization feature,

    VersionNotes
    IIS 8.0Application Initialization was built-in for IIS 8.0.
    IIS 7.5Application Initialization was released as an out-of-band module for IIS 7.5.
    IIS 7.0Application Initialization was not supported for IIS 7.0.
    roles

    For further steps to configure this application initialization, please visit Configuration.
If you find the above solution is tedious or not working, you can go ahead with below simple steps.
  • Open notepad, add the below code with site(s) you wanted to load automatically
               $client = New-Object System.Net.Webclient
               $client.UseDefaultCredentials = $true
               $webpage = $client.DownloadString($url)
  • Save the file with name scriptsload.ps1 under C:\Scripts
  • Create a Window Task Scheduler with name to it and schedule it to run on daily morning with below parameters.
  • Action:
  • Program / Scripts: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
  • Add arguements: -ExecutionPolicy Bypass -file "C:\scripts\scriptsload.ps1" \r

Tuesday, June 3, 2014

Step by Step Kerberos Authentication for SharePoint 2010


Introduction
Kerberos authentication, created at MIT and named after Hades’ three-headed guard dog Cerberus (according to Wikipedia), has been around for decades.  The latest version 5, implemented currently by Active Directory, was released in 1993.  The protocol is designed to provide rapid, secure authentication to users on a multi-system network, or “farm” as we like to call them.

Advantages over Traditional Windows Authentication

The main advantage of Kerberos over NTLM or forms-based authentication is the ability for a user’s identity to securely traverse multiple servers without requiring a re-key of the user’s credentials.  This concept is referred to as single sign-on: login once to access everything.
A secondary advantage is speed.  Authenticating connections with Kerberos tokens is considerably faster than other methods.

Platform Uniformity

Another advantage is platform uniformity.  Any application, that you wrote, or Microsoft wrote, or anyone wrote, which uses Windows Authentication can automatically use Kerberos.  It’s built in to Windows and Active Directory.  It doesn’t require custom code like a forms-based or claims-aware provider.  Enabling it is as simple as telling the web.config to use it.

Necessity

Many farm scenarios do not warrant Kerberos authentication.  How can you tell if yours does?  There is a simple test: the double-hop.  Draw a quick diagram of your farm topology.  If you have any servers which are more than two degrees of separation away from your client, you will need Kerberos authentication only if you need to delegate access to those resources.  The figure below shows the double-hop scenario.
Step_by_Step_Kerberos_Authentication_for_SharePoint_2010
Figure 1: The Double-Hop
Each connection, or “hop,” must be authenticated.  Thus, the SharePoint server must establish a secure, authenticated connection to SQL in order to return data for the user.  If the data connections above need to impersonate the user, the connections must use delegation.  Kerberos authentication allows SharePoint and SQL Server to implement delegation.

Real-World Examples

The most common example of Kerberos in practice involves Reporting Services.  A user browses to a SharePoint document library to run a Report with data in a SQL Server database.  SharePoint and SQL Server both implement Kerberos authentication to allow the user to view the Report using the user’s own credentials.  No login prompts, no proxy accounts, no stored credentials.
Setup
Setting up Kerberos authentication for SharePoint and SQL Server takes only a few minutes.  Follow the steps below to get it running in your farm.  We will assume that SharePoint requires classic mode authentication for the Web Application.  (Obviously, you will need to change CONTOSO to your Domain name and use your actual service accounts.)

1. Configure SQL Server

Configuring SQL Server to use Kerberos is easy.  Create a Service Principal Name for your SQL Server by running the setspn.exe utility from the command-line.  NOTE: you will need to be a Domain Administrator to do this:
Step_by_Step_Kerberos_Authentication_for_SharePoint_2010
Figure 2: setspn.exe Syntax

Service Principal Names

You will need to become familiar with Service Principal Names to setup Kerberos.  They are composed of the following pieces:
Service
Principal
Service Class
Endpoint
Port
Domain
User
MSSQLSvc
DB-SRV-01
1433
CONTOSO
SqlServer
This is the unique class name of the service. It differs between different types of services.
This is the DNS address where the service is accessed. In this case, it’s the server name, but it can also be the fully-qualified domain name like:
db-srv-01.contoso.local
- or an alias like -
database.contoso.local
The port is needed if it is not a standard port for the Service Class.
This is the NetBIOS domain name of the Active Directory where the service account resides.
This is the login name for the service account itself.

As far as I know, the Service Class is case-sensitive.
For good measure, Microsoft recommends creating multiple Service Principal Names.  The reason why: the client application creates the Service Principal Name when it sends it to the server.  If the client application choses to include the port number, or not include the port number, you should be ready.  The solution: create all of the following SPNs for SQL Server:
·         MSSQLSvc/DB-SRV-01 CONTOSO\SqlServer
·         MSSQLSvc/DB-SRV-01:1433 CONTOSO\SqlServer
·         MSSQLSvc/DB-SRV-01.contoso.local CONTOSO\SqlServer
·         MSSQLSvc/DB-SRV-01.contoso.local:1433 CONTOSO\SqlServer
Note the variation in the Endpoint and Port.  We do this to ensure that we cover all the possible combinations that a client application could throw at SQL Server.  This is the best practice.

2. Create a Web Application

Create a new Web Application in SharePoint 2010 to use with Kerberos authentication.  Pick Classic Mode Authentication and make sure NTLM is used.  This Web Application will be created as the Default Zone.  We want to put this on a non-standard port and use NTLM authentication to ensure that we can always access it from the SharePoint server itself.
Note: you must use a Domain Account for the application pool identity.
Step_by_Step_Kerberos_Authentication_for_SharePoint_2010
Figure 3: New Web Application

3. Extend the Web Application to use Kerberos Authentication

Extend the Web Application you just created.  Set the Zone to Intranet and put the site on Port 80.  Use the host header intranet.contoso.local:
Step_by_Step_Kerberos_Authentication_for_SharePoint_2010
Figure 4: Web Application Extension
When you click OK you will get a warning about Kerberos.  Don’t worry: the Service Principal Name can be created before or after the Web Application Extension.

6. Create the DNS Record

Your server needs a static IP address and a DNS record to be accessed by users.  When Kerberos is involved, you must be sure that you create an A (for address) record and not a CNAME (canonical name, or alias) record for the SharePoint Web Application Extension:
Step_by_Step_Kerberos_Authentication_for_SharePoint_2010
Figure 5: New DNS Record
Enter the IP address of the SharePoint server and hostname of the Web Application Extension into the box and click Add Host to save the new DNS record.  The automatically generated FQDN should read intranet.contoso.local.

4. Create a Service Principal Name

Just like we did for SQL Server, create a Service Principal Name for the SharePoint Web Application Extension:
Step_by_Step_Kerberos_Authentication_for_SharePoint_2010
Figure 6: SharePoint SPN
The SharePoint Service Principal Name breakdown is as follows:
Service
Principal
Service Class
Endpoint
Port
Domain
User
HTTP
intranet.contoso.local

CONTOSO
SP_WebApp
HTTP works for http and https connections.
This is the DNS address where SharePoint is accessed. In this case, it’s the URL of the Web Application Extension

80 is a standard port, therefore we don’t need to include it.
This is the NetBIOS domain name of the Active Directory where the service account resides.
This is the login name for the SharePoint Application Pool account.

5. Enable Constrained Delegation

If this were SharePoint 2007, we’d be done.  But SharePoint 2010 requires Constrained Delegation.  In order to enable constrained delegation you have to connect to the Domain Controller and enable Delegation on the account used to host the SharePoint Web Application Pool.
Remote Desktop into the Domain Controller, open Active Directory Users and Computers, then locate the SharePoint Web Application Pool account.  Double-click on the account and locate the Delegation tab:
Step_by_Step_Kerberos_Authentication_for_SharePoint_2010
Figure 7: Delegation
Pick Trust this user for delegation to any service and click OK.  SharePoint will now authenticate clients using Kerberos authentication to http://intranet.contoso.local
Workarounds
A common work-around to the Real-World Scenario above, when Kerberos authentication is not involved, is a proxy account: hard-code the Report Server credentials into the Report itself.  When the user accesses the Report, SharePoint connects to SQL using the stored credentials.  This is also what the Secure Store service does.  This is also a form a delegation, but does not pass the user’s actual credentials to the data store: it uses a proxy account.  Thus, all users get the same rights on the data store and the password is saved in clear-text in the Report’s connection string.  If this doesn’t meet your requirements, you need to call in Kerberos to handle the connection.
Looking Ahead
Even though Kerberos is not always needed, or possible like with extranets, the introduction of External Content Types in SharePoint 2010 as a reporting tool will greatly increase the need for it.  The increased maturity and new features in PerformancePoint, PowerPivot, and Reporting Services in SharePoint mode, if your data is not on the SharePoint server itself you will need to use delegation.  The best choice which provides the lowest maintenance overhead, the highest level of security, and the lowest processor overhead, is Kerberos authentication.  Try it out in a VM farm on your local computer.  It’s a great tool to have in your SharePoint architect’s toolbox.

Testing Kerberos

There are tools available for testing Kerberos but it’s quite easy to determine if it is running properly. 
When it’s enabled but not working the following symptoms may be present
  1. Login prompts may appear when the previously did not under NTLM Authentication
  2. Login Errors appear in the Windows Security Event Log typically stating that Kerberos authentication failed
  3. Users are required to login using Office applications when their machines are domain members and the logged in user should have rights.
When Kerberos is first configured for the application pool account a message will appear in the Windows Security Logs stating that a ticket was requested.image
Open SharePoint in a browser using the URL where Kerberos is now configured and then refresh the security log.  If Kerberos is running properly messages similar to the one below will appear in the logs on a regular basis. 
For particular users logged in, events will appear similar to the one below
image
In addition, many messages similar to the one below will appear in the event log.
image
By: Saravanan.J