Migrating Lists from SharePoint 2010 to SharePoint 2013

Server Administration

While waiting for a purchase order for Sharegate to be approved, I needed to quickly migrate content of an old SharePoint 2010 list to our new SharePoint 2013 farm. Out of the box this isn’t straight forward, and Microsoft recommend a complete backup, move and upgrade approach for the entire content database. Time-wise, this wasn’t an option and seemed overkill for a single list.

In the past I’ve experimented by writing a PowerShell script to export the list’s content to a .CSV file and it’s attachments into folders, and then another script to suck it back into the destination site.

Before heading down that route again, I searched for a different approach and found the Fast & Cheap method documented by Vlad Catrinescu.

It basically involves:

  1. Exporting the list from SharePoint 2010 via the Backup and Restore option within Central Administration.
  2. Changing the extension of the resulting files from .cmp to .cab, and extracting their contents.
  3. Amending the versions stated within the SystemData.xml file from 14.0.x.x to 15.0.x.x
  4. Repackaging them back into a .cab file via CapPack.
  5. Changing the extension from .cab back to .cmp
  6. Importing the list into SharePoint 2013 via PowerShell.
Import-SPWeb -Identity http://mysharepointsite -Path \\temp\SharePointList.cmp -IncludeUserSecurity -Verbose

It seems to have worked like a charm!

SharePoint 2013 and IE11 Support

Server Administration

Very odd. Even though I’ve been using Internet Explorer 11 and SharePoint 2013 together for some time, this morning, when I created a new Site Collection and added a Calendar, it wasn’t rendering as it should and many links were broken.

After a little research,  it seems that IE11 doesn’t work out-of-the-box with SharePoint 2013 and boils down to an inconsistency with the X-UA-Compatible meta tag.

To overcome this, I added a new URL rewrite rule into IIS that spoofs the User Agent of the visitor’s browser, forcing the SharePoint page to be rendered correctly. No Compatibility View required.

Using the Content Query web part in SharePoint without activating the Publishing feature

Server Administration

You can use the Content Query web part within a SharePoint site without activating publishing feature (which you may want to do as activating the feature introduces and changes a lot of options):

  1. Go to the Web Part Gallery within an existing publishing site
  2. Export the ContentQuery.webpart file and upload it to the Web Part Gallery of the destination site
  3. Copy the three .XSL documents (Header, ItemStyle, ContentQueryMain) from the XSL Style Sheets folder within the Style Library and transfer them to the destination site

SharePoint 2013 & PerformancePoint

Server Administration

Note to self: Instead of banging your head for two days trying to resolve the issue of PerformancePoint reports not displaying. When you see a “Failed to Sql Query data XEvent collector on sqldbserver…” message within the log files, first ensure that the SharePoint farm account has been granted the serveradmin role upon the SQL server.

See: Failed to Sql Query data XEvent collector on sqldbserver. The error is Object reference not set to an instance of an object. And other SQL related errors in SharePoint 2013

SharePoint’s People Picker Error

Development, Server Administration

Since the roll out of Internet Explorer 10, our users were having trouble whenever they attempted to give someone access to their SharePoint 2010 area via the Grant Permissions dialog. Whenever they clicked the Browse icon, they’d receive a “An unexpected error has occurred” message.

One solution that seemed to solve this issue was to add the domain of the SharePoint site into the browser’s Compatibility View Settings – but that would effect all sites using the domain (including non-SharePoint sites).

While researching the issue I found a suggestion that it could be corrected by appending a META tag to one of the MasterPages.

Normally I wouldn’t dare edit one of the SharePoint core files, but as this was effecting so many users and we’ll be migrating to SharePoint 2013 in the near future, the benefits outweighed the risks.

  1. Browse to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS and locate the pickerdialog.master file.
  2. Immediately after the opening HEAD tag, insert the following line: <meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE8″ />

The changes appear to have resolved the issue completely.

The URL is not available, does not reference a SharePoint site, or you do not have permission to connect

Server Administration

This is a handy thing to remember for an issue I just ran into. When you try to connect to a SharePoint URL from Dashboard Designer, you may see the following prompt:

“The URL is not available, does not reference a SharePoint site, or you do not have permission to connect”

To resolve the issue I had to ensure that the Service Account which was running PerformancePoint Services had been given owner-level access to the Content database.

MS SQL and MD5

Server Administration

SQL Server doesn’t appear to have a nice MD5 function like MySQL does (shame), but there is still a way to do it.

SET @value = "This is an MD5 encoded string'
SELECT SUBSTRING(sys.fn_sqlvarbasetostr(HASHBYTES('MD5', @value)), 3, 32)

This was useful for resetting the admin password within an instance of Moodle that had recently been migrated to SQL Server.

UPDATE [moodle].[dbo].[mdl_user] SET [password] = SUBSTRING(sys.fn_sqlvarbasetostr(HASHBYTES('MD5', 'newpassword')), 3, 32) WHERE [username] = 'admin'

Log into SharePoint 2013 as a different user

Server Administration

The “Sign in as Different User” option that was present in SharePoint 2010 has now been removed for SharePoint 2013 (I assume because it caused a lot of confusion between Internet Explorer and Office if you were logged onto the PC under one account and into SharePoint as another).

You can get around this by visiting http://siteurl/_layouts/closeConnection.aspx?loginasanotheruser=true

Source: “Sign in as Different User” menu option is missing in SharePoint Server 2013