Tuesday 28 June 2016

Sharepoint Designer Workflow doesn’t start automatically



Few point to be remembered while creating an automatic workflow.

1. You should never use "SYSTEM ACCOUNT" :
    Workflow never starts automatically if you are using system account.

2. Check that workflow has “Start workflow automatically when an item was created” enabled.

3. Try removing “Allow this workflow to be automatically started” from the workflow definition,        save, and republish.

6 deprecated feature of SharePoint 2016


Six features that are deprecated from SharePoint 2016 if we compare it will SharePoint 2013 or previous editions

1. SharePoint Foundation
2. Stand-Alone Installation
3. ForeFront Identity Manager Client (FIM)
4. Excel Services in SharePoint
5. Tags and Notes
6. Stsadm.exe












Error while enabling Windows feature : NetFx3


I was installing SQL server 2013 on Window server 2012  using Hyper-V and i was hit by below error.

Error while enabling Windows feature : NetFx3, Error Code : –2146498298 , Please try enabling Windows Feature : NetFx3 from Windows management tools and then run setup again.


Resolution :-

1. Insert your window server media (iso file)
2. Open the command prompt and run it as administrator
3. Type the below command:

dism /online /enable-feature /featurename:netfx3 /all /source:d:\sources\sxs

this is the easiest way to install netfx3.

Hope this article will help you :)

User Profile Sync Stuck on Starting


If your User Profile Sync service Stuck on Starting. First thing you need to do is change the service status to Stop using below Powershell.



Add-PSSnapin Microsoft.SharePoint.Powershell

$TypeName = "User Profile Synchronization Service"

$ServerName = "Server Name"

$Serviceinstance = Get-SPServiceInstance | where-object {$_.TypeName -eq $TypeName -and $_.Server.Address -eq $ServerName}

$Serviceinstance.Unprovision()

Now, Go to Service.msc and check if both  ForefrontIdentityManager Services are disabled.
   

  1. Run(Ctrl + R), type mmc.exe 
  2. Click on file -> add/remove snap in
  3. select Certificates and click Add on Certificates snap-in screen choose Computer account
  4. select local computer and click finish
  5. click ok on "Add or remove snap-ins" screen
  6. go to Console root -> certificates -> Trusted Root Certification authorities -> Certificates -> Select all ForefrontIdentityManager certificates and delete them.
  7. Look for FIM certificates in other folder also if you find any delete them.
  8. Once all the certificates has been removed. Try to start the UPA sync service.

This time it wont be getting stuck.

Hope this post will help you out :) 

SharePoint Site export and import


Below are the steps for exporting the SharePoint site and importing it to a different location.

 1. First we will do an export of the SharePoint site.
 2. Open Command Prompt as an Administrator and Navigate to location
    (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN )





3. Use " Stsadm -o export -url https://sharepoint.com/sites/test -filename D:\export.cmp -includeusersecurity -versions 4" command to export the site.

4. Once export is done ,Go to the Web application or Location where we need to create the new site



5. Choose the appropriate template

6. Repeat Step 2.

7. Use "Stsadm -o import -url https://sharepoint.com/sites/New -filename D:\export.cmp -includeusersecurity -versions 2" command to import.

8. Browse the new site.

Hope this post will help you :)

Download a WSP from SharePoint using PowerShell

If you are looking to take back-up of your WSP (solution) which are deployed in your environment and taking back-up is important before you deploy new solution.
Below script can help you to download WSP.

$farm = Get-SPFarm
$file = $farm.Solutions.Item("solution.wsp").SolutionFile
$file.SaveAs("file location where to save")


Enable rating feature in SharePoint using Powershell

 
If you are looking to enable the rating feature in your SharePoint.
Below is the script which can help you out with it.
 
Add-PSSnapin "Microsoft.SharePoint.PowerShell"


$web=Get-SPWeb "http://rahulsp.com";
$list=$web.Lists["Pages"];
if($list -ne $null)
{
Write-Host $list.Title "not null";
$assembly=[System.Reflection.Assembly]::Load("Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
$reputationHelper =$assembly.GetType("Microsoft.SharePoint.Portal.ReputationHelper");

$bindings = @("EnableReputation", "NonPublic", "Static");
[System.Reflection.BindingFlags]$flags = [System.Reflection.BindingFlags]::Static -bor [System.Reflection.BindingFlags]::NonPublic;

$methodInfo = $reputationHelper.GetMethod("EnableReputation", $flags);

#For enabling Ratings
$values = @($list, "Ratings", $false);

#OR for enabling Likes
#$values = @($list, "Likes", $false);

$methodInfo.Invoke($null, @($values));

#For disable Rating or Likes
<#$methodInfo = $reputationHelper.GetMethod("DisableReputation", $flags);
$disableValues = @($list); $methodInfo.Invoke($null, @($disableValues));#>

}
 
 

Monday 27 June 2016

Office Web Apps servers things you should NOT do when deploying

 
  • Don’t install any other server applications on the server that’s running Office Web Apps Server. This includes Exchange Server, SharePoint Server, Lync Server, and SQL Server. If you have a shortage of servers, consider running Office Web Apps Server in a virtual machine instance on one of the servers you have.                                                                                                                                                                                                                                                               
  • Don’t install any services or roles that depend on the Web Server (IIS) role on port 80, 443, or 809 because Office Web Apps Server periodically removes web applications on these ports.

Custom Metadata Properties not getting crawled

From Last two days, we were facing issue with metadata properties. They were supposed to crawled when we run the Full Crawl but metadata properties were empty.

We tried many methods mentioned on Internet but still getting same result.

At the end we find out the Root Cause of our Issue and we were like "What the Hell"

The issue was with server time. It was different on Application server and web front end servers.
Once we changed it and sync with each other, run full crawl with in  2 to 3  minutes we can see custom Metadata properties are getting Crawled.

Hope this post will help you :)

Login failed for user “NT AUTHORITY\ANONYMOUS LOGON" BCS SharePoint 2010 and 2013

If you are getting below error when trying to retrieve data from External source using BCS

“Login failed for user “NT AUTHORITY\ANONYMOUS LOGON” while browsing to external list.”

RevertToSelf or BDC identity authentication is not enabled by default on a BCS Service application on a SharePoint farm, therefore this option won’t appear in the SPD by default. Run the following Power Shell (PS) script to activate it. (make sure you replace the name of the BCS Service Application with the correct one)
 


$bcsServiceApp = Get-SPServiceApplication | where {$_ -match "Business Data Connectivity Service"}

$bcsServiceApp.RevertToSelfAllowed = $true;

$bcsServiceApp.Update();

Thursday 23 June 2016

SharePoint 2016


As we all know SharePoint 2016 is available now to explore.I recently installed SharePoint 2016 on a VM using Hyper-V

I go thru every option we have in Central Admin like Application Management, System Settings,Monitoring and other available options.

Below are some changes that has been made to Central Admin in SharePoint 2016 if we compare it with SharePoint 2013.


1. We have two new templates added for creating new site collection.
  •      In-Place Hold Policy Center 
  •      Compliance Policy Center



2. In System Settings under Server two new options has been added.

  • Manage Services in this farm
  • Convert server role in this farm.
 

3. In General Application a new Option has been added named PWA settings.


4. In Office 365,One option as been added and one removed.
  • Configure One Drive and Site Links – Removed
  • Configure Hybrid One Drive and Sites Features – Added



I will continue exploring SP2016 and will add more information about it to my blog 









Wednesday 22 June 2016

Search Result returns Document Title instead of Filename


            
 This is one of the know issue for Search in SharePoint if you have CU of October or later installed on your server

Follow below steps to fix the issue.

           1.       Go to Central Admin --- Manage service application --- Search service application
                 2.        On Search Administration page, Click on Search Schema under Queries and Results.


 
                 3.       Search for the properties called Title in Managed properties.



4.       Once you find the Title property, click on it to edit the property.

5.       Scroll Down and Go to Mappings to crawled properties. Select the MetadataExtractorTitle and move it down to last place and Click OK.

6.       Perform an Index reset. Click on Index reset under Crawling, select the option to deactivate search alerts and click OK.

7.       Once Index resetting is done. Click on Content Sources and start Full Crawl
8.       After Full crawl is done, Search result will return filename instead of document title.