SharePoint 2013 Site Collection Export – String or binary data would be truncated

Problem: During a site collection export, we received the nebulous SQL Server error “String or binary data would be truncated.” Based off some research and experience in the past, this is normally caused by a URL somewhere in the site exceeding the 260 character limit. We queried the AllDocs table in the content database to…


Patching AppFabric (Distributed Cache) for SharePoint 2013

Patching App Fabric on a SharePoint 2013 Farm Introduction The Distributed Cache is a new feature in SharePoint 2013. It provides in-memory caching services to several features including Newsfeeds, Authentication, OneNote client access, Security Trimming, and Page load performance. It runs off a Microsoft technology called AppFabric, which means that any patching that AppFabric needs,…


Consolidate SharePoint Content Databases

When managing a SharePoint environment, there are times when the number of content databases grow, with most of them only being partially utilized. This could happen as a result of a migration, site collection creations that were not planned properly, or other reasons. This script will help you consolidate databases, showing you which site collections…


Nintex To-Do Task – First Response Applies

When creating a Nintex workflow, one of the actions you can add is a "to-do task". You are then able to enter multiple assignees for this task.  One of the task options is "First response applies". This means that as long as one of the assignees approves, the workflow can continue without waiting for all…


C# .NET version of SharePoint 2010's Add-SPShellAdmin

When you need a user or group to have PowerShell access to a SharePoint content database, you simply run the PowerShell command "Add-SPShellAdmin -Database <TheDatabaseObject or GUID>". This does all the backend work, creating the necessary database roles and schemas, and adding the users/groups to them. There may be times when using PowerShell is not…


Getting Current List of Users Who Have Permissions to a Site/Web

I ventured out on the task this week of trying to generate a list of users who currently have some level of permissions to a SharePoint site collection or sub site. This turned out to be a more challenging task than one would think. At the site collection level, there is the User Info table….


ULS Logs Not Consistently Being Written to Usage Database

SharePoint gives you the option to write ULS logs to the Usage database. In order for this to work, your farm must have a 'Usage and Health Data Collection Service' Application running. You can enable this by going into Central Administration – Monitoring – Configure usage and health data collection – Enable usage data collection….


PowerShell Script to Find Site Collections not Using a Storage Quota

You may come across situations where you need to know which site collections in your farm are not using one of the farm storage quotas. The script below will find and output these sites. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Get available quota templates in farm$Templates = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.QuotaTemplates #Loop through wach web appforeach($webApp in Get-SPWebApplication){    #Loop through…


Changing Site Owner and Secondary Owners in a SharePoint Farm

Sometimes a user who is a site owner or secondary owner across many SharePoint sites leaves the company or changes roles. This person needs to be removed from the owner roles on these sites. This change can only be done in Central Admin or PowerShell so the normal end user would not be able to…