SharePoint Dragons

Nikander & Margriet on SharePoint

Monthly Archives: November 2011

File Migrator for SharePoint

In our experience, doing a bulk upload of files located on a file server is hard to do without a 3rd party tool. Quest’s File Migrator looks like an interesting solution for this problem: http://www.quest.com/file-migrator-for-sharepoint/

Deploying XBAP in SharePoint 2010

Repeatedly we’re seeing advice suggesting not to build XBAPs in favor of Silverlight. In our view, there’s nothing wrong with using XBAP and displaying it in a page viewer web part. In fact, a lot of times XBAPs are actually more powerful. Of course Silverlight has better platform support, but in our experience projects using Silverlight are targeting MSIE/Windows audiences anyway.

In the case of SharePoint, when you choose to use XBAP you’ll miss out on some of the integration opportunities SharePoint/Silverlight combinations offer (such as the Silverlight web part and the client object model).

It seems that it’s not possible to host XBAPs in SharePoint itself, for instance, in the layouts folder, and this is a question that has come up a couple of times in the MS forums. The solution is simple:

  • Just open IIS Manager and choose Add Application and create your own virtual directory, in my case I’ve called it xbaphost.
  • Deploy your XBAP application using ClickOnce. For me, that leads to the following URL:http://moon/xbaphost/myxbap.xbap
  • Check that this works.
  • Point the page viewer web part to http://moon/xbaphost/myxbap.xbap (replace with your URL)

Works like a charm!

The SharePoint Administration Toolkit for SharePoint 2010

A nice addition to your bag of tricks: the SharePoint Administration Toolkit. It contains:

  • A load testing kit to simulate load against a SharePoint farm and is intended to help to determine if a new environment is able to handle the current load (it analyzes IIS log files in order to do that).
  • A User Profile Replication Engine, allows you to replicate user profiles as  well as social data (such as tags, notes and ratings).
  • A Security Configuration Wizard manifest, an attack surface reduction tool that disables functionality that is not required.
  • A Content Management Interoperability Services (CMIS) connector that allows users to interact with data that is stored in any repository that implements the CMIS standard.
  • And probably the best tool of the batch, SharePoint Diagnostic Studio 2010, a tool that simplifies troubleshooting. This tool is also used by Microsoft support personnel.

If you’re interested, go check out http://technet.microsoft.com/en-us/library/cc508851.aspx

SharePoint LogViewer

If you’re gonna use a SharePoint log viewer tool, consider this one, it looks quite promising: http://sharepointlogviewer.codeplex.com/

It has the following key features:

  • View multiple SharePoint log files at once
  • Search by any field
  • Filter the log by any field
  • File drag & drop support
  • Live monitoring for entire farm
  • Export filtered log entries
  • Bookmark log entries
  • Get popup notification of SharePoint log events from system tray
  • Receive email notifications on errors
  • Redirect log entries to event log
  • Now with SharePoint 2010 Support

Can’t use PowerShell to create a site using a site template

Just stumbled across this. It’s not possible to use PowerShell to create a site based on a site template.

In this example, we’ve created a site template called “mytemplate” based on the “STS” template. Normally, you can use the new-spweb cmdlet and specify a template like so:

new-spweb http://moon/sites/sc1/autosite1 -template “mytemplate”

(Or add –whatif to the end if you’re getting cold feet).The –tempate parameter accepts a piped spwebtemplate object, which can be retrieved via:

Get-SPWebTemplate | more

As you will see, a site template saved in the site collection solution catalog won’t show up here. As an alternative, you can try to establish the template that was used to create an existing web site, like so (please note, we’ve created a site called “myinstance” using the “mytemplate” site template:

$web = get-spweb http://moon/sites/sc1/myinstance

write-host “Web Template:” $web.WebTemplate ” | Web Template ID:” $web.WebTemplateId

$web.Dispose()

If you experiment with this, you will find that the web template it still the underlying parent of the saved template. In my case “mytemplate” was based on the “STS” template, so that’s still the one that is actually the web template of “myinstance”.

PowerShell script for monitoring SharePoint WFE’s and SQL Server back-ends

Choosing, and automating the monitoring of, the correct set of performance counters for monitoring SharePoint WFE’s and back-ends is a daunting task, and this is my attempt:

http://gallery.technet.microsoft.com/PowerShell-script-for-59cf3f70

Leveraging the logging database to see performance counters

SharePoint Server 2010 ships with a logging database (default name: WSS_Logging). You can make sure information gets added into it by opening SharePoint Central Administration > Monitoring > Timer Jobs > Review Job Definitions and enable or run all timer jobs starting with “Diagnostic Data Provider”.

After that, if you want to take a look at the performance counters, you can use the PerformanceCounters view in the logging database. Since it only shows counterid’s, the view in itself is not very helpful unless combined with information coming from the PerformanceCountersDefinitions table that includes the path and the instance name of the performance counters, like this:

SELECT TOP 1000 [PartitionId]
      ,[RowId]
      ,[LogTime]
      ,[MachineName]
      ,[CounterId]
      ,[Value]
      ,[RowCreatedTime]
      , pd.counter
      , pd.instance
  FROM [WSS_Logging].[dbo].[PerformanceCounters]
  join [WSS_Logging].[dbo].[PerformanceCountersDefinitions] pd ON counterid = pd.id

Give your SharePoint dev environment a boost!

We have found that when doing SharePoint development on our own custom Windows 2008 virtual machine the following tool comes in really handy: the Windows Server 2008 Workstation Converter (http://www.askvg.com/download-windows-server-2008-workstation-converter-created-by-sawo/). It makes the server behave more like a workstation and does things like:

  • Enable audio
  • Disable IE Enhanced security configuration
  • Install desktop experience
  • Disable CTRL+ALT+DELETE at startup
  • Disable shutdown event trackker
  • Enable Windows search service
  • Enable auto logon
  • Disable verbose messages at startup/shutdown