Sunday, January 3, 2016

Location of Microsoft.Sharepoint.dll in SharePoint 2013 and SharePoint 2016

Sometimes if you want to work with the SharePoint server object model then you need to refer to Microsoft.SharePoint.dll. Similarly, if you want to work with .Net client object model then you need to refer to Microsoft.SharePoint.Client.dll.

The dll is available in the ISAPI folder in the SharePoint installation directory.

Also read: Microsoft Flow Step by Step Tutorial with Examples

SharePoint 2016:
Both Microsoft.SharePoint.dll and Microsoft.SharePoint.Client.dll will be available in the below directory. Here I have installed SharePoint in C drive.

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI

SharePoint 2013:
Both the dlls will be available in the below directory:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI

SharePoint 2010:
Both the dlls will be available in the below directory:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI


Saturday, January 2, 2016

Change SharePoint 2013 ULS Log file location

By default SharePoint 2013 put all the logs in the below directory:
%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\15\LOGS\

But sometimes you may need to put in a different location other than the default one. Follow the below steps:

You can also read: SharePoint 2013 Logs for Analyzing or troubleshooting the issues related to workflows or Workflow Manager

Open your SharePoint 2013 central administration, then click on Monitoring. This will open the Monitoring page.

Click on  "Configure usage and health data collection" under Reporting like below:


Then in the Diagnostic Logging page go to the Usage Data Collection Settings section, there change the ULS log path like below:


Change ULS Log path using PowerShell:
You can also change the log path using PowerShell like below:

Open your SharePoint 2013 Management Shell and then run the below cmdlet:

Set-SPDiagnosticConfig -LogLocation D:\SPLogs


SharePoint 2013 Disable List Throttling using PowerShell

If your list items increased beyond the threshold limit, then we can disable the list throttling using PowerShell.

You can also check: SharePoint 2013 In place Record Management

Below is the PowerShell command to disable list throttling using PowerShell.

Add-PSSnapin Microsoft.SharePoint.PowerShell

$web = Get-SPWeb http://OnlySharePoint2013:2334/

$list = $web.Lists["ListName"]

$list.EnableThrottling = $false

$list.Update()

I hope this will be helpful.


How to get SharePoint 2013 site template names using PowerShell?

We will discuss how we can get SharePoint 2013 site templates.

We can be able to get site template names of SharePoint 2013 using PowerShell. Below is the PowerShell command which will display the list templated in the PowerShell editor.

You may like: Activate SharePoint Server Publishing Feature programmatically using CSOM

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Get-SPWebTemplate

The below PowerShell command will download the site templates in a text file.

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Get-SPWebTemplate >> E:\Bijay\sitetemplate.txt

This will show all the site templates like below:

Name                 Title                                    LocaleId   CompatibilityLevel   Custom  
----                 -----                                    --------   ------------------   ------  
GLOBAL#0             Global template                          1033       15                   False  
STS#0                Team Site                                1033       15                   False  
STS#1                Blank Site                               1033       15                   False  
STS#2                Document Workspace                       1033       15                   False  
MPS#0                Basic Meeting Workspace                  1033       15                   False  
MPS#1                Blank Meeting Workspace                  1033       15                   False  
MPS#2                Decision Meeting Workspace               1033       15                   False  
MPS#3                Social Meeting Workspace                 1033       15                   False  
MPS#4                Multipage Meeting Workspace              1033       15                   False  
CENTRALADMIN#0       Central Admin Site                       1033       15                   False  
WIKI#0               Wiki Site                                1033       15                   False  
BLOG#0               Blog                                     1033       15                   False  
SGS#0                Group Work Site                          1033       15                   False  
TENANTADMIN#0        Tenant Admin Site                        1033       15                   False  
APP#0                App Template                             1033       15                   False  
APPCATALOG#0         App Catalog Site                         1033       15                   False  
ACCSRV#0             Access Services Site                     1033       15                   False  
ACCSVC#0             Access Services Site Internal            1033       15                   False  
ACCSVC#1             Access Services Site                     1033       15                   False  
BDR#0                Document Center                          1033       15                   False  
DEV#0                Developer Site                           1033       15                   False  
DOCMARKETPLACESITE#0 Academic Library                         1033       15                   False  
EDISC#0              eDiscovery Center                        1033       15                   False  
EDISC#1              eDiscovery Case                          1033       15                   False  
OFFILE#0             (obsolete) Records Center                1033       15                   False  
OFFILE#1             Records Center                           1033       15                   False  
OSRV#0               Shared Services Administration Site      1033       15                   False  
PPSMASite#0          PerformancePoint                         1033       15                   False  
BICenterSite#0       Business Intelligence Center             1033       15                   False  
SPS#0                SharePoint Portal Server Site            1033       15                   False  
SPSPERS#0            SharePoint Portal Server Personal Space  1033       15                   False  
SPSPERS#2            Storage And Social SharePoint Portal ... 1033       15                   False  
SPSPERS#3            Storage Only SharePoint Portal Server... 1033       15                   False  
SPSPERS#4            Social Only SharePoint Portal Server ... 1033       15                   False  
SPSPERS#5            Empty SharePoint Portal Server Person... 1033       15                   False  
SPSMSITE#0           Personalization Site                     1033       15                   False  
SPSTOC#0             Contents area Template                   1033       15                   False  
SPSTOPIC#0           Topic area template                      1033       15                   False  
SPSNEWS#0            News Site                                1033       15                   False  
CMSPUBLISHING#0      Publishing Site                          1033       15                   False  
BLANKINTERNET#0      Publishing Site                          1033       15                   False  
BLANKINTERNET#1      Press Releases Site                      1033       15                   False  
BLANKINTERNET#2      Publishing Site with Workflow            1033       15                   False  
SPSNHOME#0           News Site                                1033       15                   False  
SPSSITES#0           Site Directory                           1033       15                   False  
SPSCOMMU#0           Community area template                  1033       15                   False  
SPSREPORTCENTER#0    Report Center                            1033       15                   False  
SPSPORTAL#0          Collaboration Portal                     1033       15                   False  
SRCHCEN#0            Enterprise Search Center                 1033       15                   False  
PROFILES#0           Profiles                                 1033       15                   False  
BLANKINTERNETCONT... Publishing Portal                        1033       15                   False  
SPSMSITEHOST#0       My Site Host                             1033       15                   False  
ENTERWIKI#0          Enterprise Wiki                          1033       15                   False  
PROJECTSITE#0        Project Site                             1033       15                   False  
PRODUCTCATALOG#0     Product Catalog                          1033       15                   False  
COMMUNITY#0          Community Site                           1033       15                   False  
COMMUNITYPORTAL#0    Community Portal                         1033       15                   False  
SRCHCENTERLITE#0     Basic Search Center                      1033       15                   False  
SRCHCENTERLITE#1     Basic Search Center                      1033       15                   False  
visprus#0            Visio Process Repository                 1033       15                   False  
GLOBAL#0             Global template                          1033       14                   False  
STS#0                Team Site                                1033       14                   False  
STS#1                Blank Site                               1033       14                   False  
STS#2                Document Workspace                       1033       14                   False  
MPS#0                Basic Meeting Workspace                  1033       14                   False  
MPS#1                Blank Meeting Workspace                  1033       14                   False  
MPS#2                Decision Meeting Workspace               1033       14                   False  
MPS#3                Social Meeting Workspace                 1033       14                   False  
MPS#4                Multipage Meeting Workspace              1033       14                   False  
CENTRALADMIN#0       Central Admin Site                       1033       14                   False  
WIKI#0               Wiki Site                                1033       14                   False  
BLOG#0               Blog                                     1033       14                   False  
SGS#0                Group Work Site                          1033       14                   False  
TENANTADMIN#0        Tenant Admin Site                        1033       14                   False  
ACCSRV#0             Access Services Site                     1033       14                   False  
ACCSRV#1             Assets Web Database                      1033       14                   False  
ACCSRV#3             Charitable Contributions Web Database    1033       14                   False  
ACCSRV#4             Contacts Web Database                    1033       14                   False  
ACCSRV#6             Issues Web Database                      1033       14                   False  
ACCSRV#5             Projects Web Database                    1033       14                   False  
BDR#0                Document Center                          1033       14                   False  
OFFILE#0             (obsolete) Records Center                1033       14                   False  
OFFILE#1             Records Center                           1033       14                   False  
OSRV#0               Shared Services Administration Site      1033       14                   False  
PPSMASite#0          PerformancePoint                         1033       14                   False  
BICenterSite#0       Business Intelligence Center             1033       14                   False  
SPS#0                SharePoint Portal Server Site            1033       14                   False  
SPSPERS#0            SharePoint Portal Server Personal Space  1033       14                   False  
SPSMSITE#0           Personalization Site                     1033       14                   False  
SPSTOC#0             Contents area Template                   1033       14                   False  
SPSTOPIC#0           Topic area template                      1033       14                   False  
SPSNEWS#0            News Site                                1033       14                   False  
CMSPUBLISHING#0      Publishing Site                          1033       14                   False  
BLANKINTERNET#0      Publishing Site                          1033       14                   False  
BLANKINTERNET#1      Press Releases Site                      1033       14                   False  
BLANKINTERNET#2      Publishing Site with Workflow            1033       14                   False  
SPSNHOME#0           News Site                                1033       14                   False  
SPSSITES#0           Site Directory                           1033       14                   False  
SPSCOMMU#0           Community area template                  1033       14                   False  
SPSREPORTCENTER#0    Report Center                            1033       14                   False  
SPSPORTAL#0          Collaboration Portal                     1033       14                   False  
SRCHCEN#0            Enterprise Search Center                 1033       14                   False  
PROFILES#0           Profiles                                 1033       14                   False  
BLANKINTERNETCONT... Publishing Portal                        1033       14                   False  
SPSMSITEHOST#0       My Site Host                             1033       14                   False  
ENTERWIKI#0          Enterprise Wiki                          1033       14                   False  
SRCHCENTERLITE#0     Basic Search Center                      1033       14                   False  
SRCHCENTERLITE#1     Basic Search Center                      1033       14                   False  
SRCHCENTERFAST#0     FAST Search Center                       1033       14                   False  
visprus#0            Visio Process Repository                 1033       14                   False  


Backup and Restore Site Collection using PowerShell in SharePoint 2013

We can do easily backup and restore of site collection using PowerShell in SharePoint 2013.

You can read: Move documents from one list to another list with metadata in SharePoint 2013 Online

Below is the PowerShell cmdlet to Backup a site collection in SharePoint 2013.

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Backup-SPSite https://SiteURL/SiteName/ -Path "E:\Bijay\MySite.bak"

Below is the PowerShell cmdlet to Restore the site collection from Backup file in SharePoint 2013.

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Restore-SPSite https://SiteURL/SiteName/ -Path "E:\Bijay\MySite.bak" -Force


Clear SharePoint 2013 designer Cache

Sometimes whatever changes you are doing in your SharePoint 2013 or 2010 designer workflow does not reflect when you check in the browser. One of the main reason is the SharePoint 2013 designer cache.

You can see: Update Farm Account Credentials in SharePoint 2013 using STSADM

First of all close your SharePoint 2013 designer.

Go to the below location and delete everything presented.
%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache

Then go to the below location and delete everything presented.
%APPDATA%\Microsoft\Web Server Extensions\Cache

Then Open SharePoint 2013 designer workflow. Go to FIle -> Options -> General -> Application Options.

Then in the Application Options, uncheck option "Cache site data across SharePoint Designer sessions" under General tab. It looks like below:



After this you can start your SharePoint 2013 designer and publish the workflow. It should work as expected.


Twitter Delicious Facebook Digg Favorites More