04 September 2012

How do I - Identify the SharePoint site template type and ID of a given sub web?

This one always comes up at some point in time, especially after migrations.  I've seen issues with migrated sites many times when custom site templates were used for sites, since SharePoint doesn't know how to upgrade these sites 100%.  A good example is the Fab40 templates that people loved to install in SharePoint 2007.  When migrating to 2010, the templates are not supported and if the templates were not installed on the target server, issues will arise with the sites.  The most common of these are that the home pages will simply throw a 404 error.  You can navigate through the site settings pages just fine, but the home pages just doesn't work.  For this reason, I always start my trouble shooting by asking what type of site I'm dealing with.  Since it's most unlikely that your site admin would know in most cases, it becomes necessary to be able to identify that.  Here's a quick Powershell script for doing so.

$web = Get-SPWeb "http://sharepoint.crayveon.com/Research/Encryption Algorithms"
write-host "Template Name: " $web.WebTemplate
write-host "Template ID: " $web.WebTemplateId
$web.Dispose()




NOTE:  The URL supplied to Get-SPWeb should be in quotes and should NOT contain unescaped characters i.e. http://sharepoint.crayveon.com/Research/Encryption%20Algorithms will NOT yield a valid SPWeb object, but "http://sharepoint.crayveon.com/Research/Encryption Algorithms" will.



Enjoy

C



RSS Google+TwitterLinkedInFacebookMVPQuixCC

How do I – Identify the SharePoint site template type and ID of a given sub web?

This one always comes up at some point in time, especially after migrations. I’ve seen issues with migrated sites many times when custom site templates were used for sites, since SharePoint doesn’t know how to upgrade these sites 100%. A good example is the Fab40 templates that people loved to install in SharePoint 2007. When migrating to 2010, the templates are not supported and if the templates were not installed on the target server, issues will arise with the sites. The most common of these are that the home pages will simply throw a 404 error. You can navigate through the site settings pages just fine, but the home pages just doesn’t work. For this reason, I always start my trouble shooting by asking what type of site I’m dealing with. Since it’s most unlikely that your site admin would know in most cases, it becomes necessary to be able to identify that. Here’s a quick Powershell script for doing so.

$web = Get-SPWeb "http://sharepoint.crayveon.com/Research/Encryption Algorithms"
write-host "Template Name: " $web.WebTemplate
write-host "Template ID: " $web.WebTemplateId
$web.Dispose()
NOTE: The URL supplied to Get-SPWeb should be in quotes and should NOT contain unescaped characters i.e. http://sharepoint.crayveon.com/Research/Encryption%20Algorithms will NOT yield a valid SPWeb object, but “http://sharepoint.crayveon.com/Research/Encryption Algorithms” will.

Cheers
C

Microsoft Authentication Library (MSAL) Overview

The Microsoft Authentication Library (MSAL) is a powerful library designed to simplify the authentication process for applications that conn...