Category Archives: SharePoint Tips

Save site as a template in MOSS 2007

If you’re using MOSS 2007 you’ve probably noticed in the site settings there isn’t anywhere to save your site as a template. This issue should be resolved in SharePoint 2010 but if you’re using 2007 here is your solution:

Navigate to the site you want to save as a template. Click Site Actions, Site Settings, Modify all Site Settings. Once you’re on that screen your URL will look similar to the following:

Take out the “settings.aspx” portion and enter in “savetmpl.aspx” so it looks like the following: and hit enter.

You should see the following screen:

If you want to go in and delete a saved template you go to the top level site settings and click on Site Templates and you can delete them from there.

Hope this helps!!

Leave a comment

Posted by on April 14, 2011 in SharePoint Tips


Kerberos Authentication in SharePoint

We’re currently using Kerberos in our environment but I have to say it was a little more difficult to get working than I had originally hoped. There is a lot of documentation out there explaining Kerberos authentication and the process in which it should be done but what I had trouble finding were specifics on the account changes that need to be made. Here are the notes I took down from this process. These are specific to our setup but will hopefully be of some help.

Before you even use SharePoint with the intention of authenticating with Kerberos you need to apply the Infrastructure updates to your MOSS installation. There are separate updates for WSS and MOSS so be sure to install both. WSS first then the MOSS update. Kerberos authentication cannot be configured to work with the Shared Services Provider infrastructure otherwise.

You also need to have your server and service accounts set to “Trust this computer for delegation to any service (Kerberos only)” in their Active Directory properties. If you have to have the services trusted for delegation specified like in our case then here are the services you want to trust:









Once you have the Infrastructure updates applied and your server(s) trusted, you need to have your SharePoint accounts created. Whether you’re using one or multiple accounts they need to be in place beforehand. You must register your Service Principal Names (SPN) before authentication can work. Here are the specific SPN’s  you need registered along with the command line to use. This command will have to be run on the MOSS server itself using adsutil.exe (Administration Script Utility). This is also assuming you already have a domain controller to authenticate to.

This will vary depending on your account set up but I’ll try to generalize them:

(You do not need the “” in this commandline, they are simply to separate items)

For your SQL Service account:

setspn -A mssqlsvc/”servername“:1433 (default SQL service port)

setspn -A mssqlsvc/”servername“.”domainname“:1433 (ex. myserver.mydomain:1433)

For your Application Pool account:

setspn -A http/”mysite URL” “application pool account name

setspn -A http/”site collection URL” “application pool account name

setspn -A http/”servername

setspn -A http/”servername“.”domainname

For your SharePoint admin account:

setspn -A http/”servername

setspn -A http/”servername“.”domainname

For your Shared Services Provider (SSP) account:

setspn -A mssp/”servername“:56737/”SSP name

setspn -A mssp/”servername“:56738/”SSP name” (56737 and 56738 being the standard IIS ports for SSP)

For your SharePoint Search account:

setspn -A http/”servername

setspn -A http/”servername“.”domainname

Anything in bold you will obviously have to put in your own info and if you’re using less accounts then some of these will be combined. You can see the ones that are redundant and go from there. If you’re setting up Kerberos for

Here is a really good article on this if you want to know the specifics of how Kerberos and SharePoint work together.

If you have any questions feel free to ask.

Leave a comment

Posted by on June 9, 2009 in SharePoint Tips


Reset Crawled Content in MOSS 2007

In MOSS 2007 each Shared Services Provider has a single content index. Meaning that all content stored across the various content sources is referenced from a single index. This improves administration functions when you work with multiple content sources. When you make major changes to content sources and search settings or if you notice a large number of errors in search event logs, you may be required to reset the content index for your SharePoint environment. After this has been completed you need to manually initiate a Full Crawl of various content sources to repopulate the content index. If you do not rebuild the content index, search will be unable to work because the index will be empty.

How to reset all crawled content:

  • Go to your Shared Services Administration site of your SharePoint environment and select Search Settings.
  • Then select Reset All Crawled Content.
  • Leave the checkbox to deactivate all search alerts during the reset (see below image). This will avoid any unnecessary alerts being sent to users of the system during this update.

Reset Crawled Content


  • Once completed be sure to perform a Full Crawl to repopulate the content.

Posted by on May 27, 2009 in SharePoint Tips


Extract documents from a SharePoint database

We had a situation come up where we had taken down a SharePoint server and of course all of the users said they had everything they needed from it until 3 weeks later when several documents were found “conveniently missing”. All we had left were the databases from the installation and I found a really good script to extract documents from your database.

General Warning

This script goes directly against a MOSS 2007 content database which is generally discouraged. Any code using the database directly will not be supported by MS Product Support Services. Instead, the SharePoint and WSS APIs are the way to go. If the database is modified directly rather than through the published SharePoint and WSS APIs Product Support Services cannot properly troubleshoot any unexpected issues. This script reads from the database so we’re safe from errant modifications. However, the data structure the script queries could change in a future service pack.

Here is the script we used and you can copy and paste this into Notepad and save it as ex “extractdoc.vbs”.

Dim contentDatabase
Dim leaf
Dim outputPath
server = “server name
contentDatabase = “database name
leaf = “filename
outputPath = “C:\Temp\filename

ExtractDoc server, contentDatabase, leaf, outputPath

Sub ExtractDoc(server, contentDatabase, leaf, outputPath)

  Dim conStr, selectStr

  conStr = “Provider=SQLOLEDB;data Source=” + server + “;Initial Catalog=” + contentDatabase + “;Trusted_Connection=yes”

  selectStr = “SELECT dbo.AllDocStreams.Content FROM dbo.AllDocs ”
  selectStr = selectStr + “INNER JOIN dbo.AllDocStreams ”
  selectStr = selectStr + ”  ON dbo.AllDocs.ID= dbo.AllDocStreams.ID ”
  selectStr = selectStr + ” AND dbo.AllDocs.Level = dbo.AllDocStreams.Level ”
  selectStr = selectStr + ” where LeafName='” + leaf +”‘ AND IsCurrentVersion=1″

  Set cn = CreateObject(“ADODB.Connection”)
  Set rs = CreateObject(“ADODB.Recordset”)
  cn.Open conStr
  Set rs = cn.Execute(selectStr)
  Set mstream = CreateObject(“ADODB.Stream”)
  mstream.Type = 1
  mstream.Write rs.Fields(“Content”).Value
  mstream.SaveToFile outputPath, 2
End Sub

This took some research to find but it worked like a charm. Simply replace the server name, database name and filename fields with the appropriate values and you’re good to go. The filenames unfortunately have to be exact or it will not find it. Also, be sure to include the extension with the filename.

Hope this helps!


Posted by on May 12, 2009 in SharePoint Tips