Saturday, 25 February 2012

SharePoint CoE & Estimating SharePoint Projects

Overview:  On Tuesday 21st of February I present a real world experience of a method of estimating and providing a high level design for SharePoint projects as done in our CoE at the SharePoint User Group UK (SUGUK) meeting in Nottingham.

Here is the slide deck (pptx) 1.1MB

Also see:

Quick Way to Verify your Build

Problem: Going to a new client you need to work out each of their enviroments, this can be done using CA, PowerShell and T-SQL.

Inital Hypothesis:  Create a PowerShell script that crawls and maps the farm, and outputs the results.  This should examine all the WFE and application servers and the SQL Servers.  If should report on the OS, SQL Server and SharePoint. 

Resolution:  Until someone builds a better flushed out script, I am looking at the local instance of SQL (default) and the SharePoint farm.  This script has been tested to run on a full standalone machine containing both SQL Server and SP2010.
Additional work could be done to crawl all servers in the farm and output the results.  As BGInfo gives the local admin all the network and OS data, this script does it for the application software.

Additional work to do to this script is to loop thru all the SQL instances remotely, display a report or even generate a nice diagram and potentially change the background screen save with all the information on the server containing Central Admin.

In the screen shot above: SQL Server build versions 10.50.2500.0 is SQL Server 2008 R2 SP1; SP2010 build version 14.0.6109.5002  is CU August 2011. download.

Updated: 19 July 2012 - Add the line tot he script to show SQL 2012 under the version:
11 {[string]$SqlInfo.SQL_Version = "SQL Server 2012"}

Updated: 24/02/2012 - I had problem in UAT where I was getting stange behaviour and I releaised somebody had changed the time on one of 10 SharePoint servers causing me problems.  The script below verifies the TimeZone for servers in your farm. 
More Info:
SP2010 build number by Dave Coleman.

Patching a Production SharePoint Farm with CU or SP

Problem: How do you keep a farm up to date but stable whereby patch don’t cause problems to your users or applications in a SharePoint 2010 farm.

Initial Hypothesis: Various software parts are in the SharePoint farm excluding 3rd party add-ins. Windows 2008 R2 gets patch, Cumulative updates and service packs. The 3 products to upgrade from Microsoft are:
• Windows;
• SQL Server; and
• SharePoint 2010.

Microsoft provides 3 mechanisms for patching:
1. Windows Updates are configured to pull down the updates and then prompt or install the updates automatically.
2. Manual Patching by downloading and executing the patch as directed by Microsoft.
3. Windows Server Update Services (WSUS) where a central server pulls all the patches and pushes the patches to the servers.

Resolution: Let patches unless marked as critical from Microsoft be release for a few weeks (4-8 is a good number for me) before implementing them. Roll out to test on a Monday, roll-out the patches on Wednesday and Friday night role out the patches to production.

Patch Windows, SQL & SharePoint regularly.

Windows 2008 must patch the servers on a weekly basis using the WSUS approach in a staggered phased approach as described above and currently done. Also ensure IIS application applicable patches are installed.

SQL patching should be done manually unless there are multiple instances which is only the case in the largest of farms. This should be setup manually but rolled out using WSUS.

SharePoint Patching should not be auto scheduled for deployment. An administrator/Infrastructure should periodically decide on a patch level and apply it via the WSUS service. This can be done manually but as it takes time to perform on each server and as the environment grows this can take time. We also need to watch out for running the configuration as this can take time on big content databases. Also this can be staggered so we install the patch but the content databases are staggered as to when they are updated with the new schema.

Note: An automatic update will install the binary files on the farm servers, but you must complete the software update by running the upgrade on the servers. Technet (

Problem: Updating SharePoint 2010 using Cumulative Updates (CU) ensures your farm has bugs and the latest known security vulnerabilities are closed to attack. Update too early after the patch is release and you risk causing a major disruption to your farm.

Initial Hypothesis: Patches need to be implemented to ensure the farm is secure, stable and as performant as possible. I recommend letting new patches wait for 4 weeks to ensure the major bugs are discovered and potentially corrected by Microsoft.

Since the August 2011 Cumulative Update, Microsoft releases a single package that covers all the SharePoint versions (Foundation, Server), only the applicable patches (.msp files) parts that are needed on your farm are installed. You can still download the CU as a smaller package if you select the Foundation CU. The Cumulative Update contains all hotfixes since SharePoint 2010 was released.

Note that the SharePoint Server 2010 CU contains the SharePoint Foundation CU also, since the August 2011 Microsoft has taken this approach so you only need to install the CU that matches your edition. You no longer need to install the foundation and then the Server edition.

It is recommended that SP1 be installed before the CU however, if you don’t it will include the SP1 fixes. “Software updates include any update, update rollup, service pack, feature pack, critical update, security update, or hotfix”, Technet (

Resolution: Plan (learn), backup (prepare), test, implement and verify (validate) is the basic testing plan suggested by Microsoft.

Deploying updates in a SharePoint Server 2010 environment consists of: downloading the binaries, installing (also referred to as updating) and upgrading by running the configuration wizard (not always). Ensure all servers in the farm (excluding the database servers) have been patched/updated before upgrading (running the configuration wizard (psconfig)).

Validate the CU upgrade:
Check if psconfig needs to be run:
PS> (get-spserver $env:computername).NeedsUpgrade
if True then
psconfig.exe -cmd upgrade -inplace b2b -force

Ensure the version is the version you are expecting after the patch.
Example of SP2010 SP1 with August 2012 CU:
Major  Minor  Build  Revision
-----  -----  -----  --------
14     0      6126   5000

CA > Upgrade and Migration > Check upgrade status

Update 17/03/2014: SharePoint 2013 with SP1 applied results in 15.0.4569.1000

More Info:
December 2011 CU for SharePoint 2010 -
List of SP CU downloads and their build numbers.
PSConfig switches explained by Benjamin Athawes

Example from Benjamin Athawes
Upgrading product version (Major e.g. MOSS 2007 to SP2010 or SP2013 upgrades):

psconfig.exe -cmd upgrade -inplace v2v -wait

Applying a patch (minor e.g. CU or Service Pack):

psconfig.exe -cmd upgrade -inplace b2b -wait

Migrating Lotus Notes to SharePoint

Problem:  A common scenario is for large organisations to need to migrate from Lotus Notes (LN) to SharePoint 2010.  This post looks at potential issues and provides guidance for planning your migration. 

Initial Hypothesis:  To migrate from Lotus Notes, you will generally have a lot of databases so a migration tool such as Quest Migration Manager is a necessity.  Also consider using a firm that has done migrations they know the tools and have taken a lot of the hard knocks which saves time and produces better results.  Migrations take a long time, most large enterprises want everything migrate in the 12-18 month timeframe until they hear the cost and understand the complexity.  Clients need to be pragmatic but they often simply want Lotus to disappear and SharePoint to replace it.  Yes, it is possible, but as with all IT projects plan and spend you money wisely.

Resolution: Each scenario is unique but it is important to get expertise in Migration and know the migration tools.  And most obviously plan, plan, plan. 

At the highest level I break this into 3 steps: 1) analyse, 2) plan and 3) implement. 

1.> Analysis
During analysis use a tool to provide technical analysis on the Lotus Notes databases.  This is very useful to group the LN applications into how complex the specific migration will be.  The easiest will be direct LN into SharePoint templates, followed by simple list migration.  At the other end of the scale will be customised forms, logic and workflow.  The tools won't migrate the logic or forms (well some claim to) but they can all move your master and historic data to SharePoint.  Also a manual look at the LN database application helps asses the database, speak to the custodian of the LN database.  At the end of the analysis phase, you should have removed duplicate database, unused databases, categorised the difficulty of migration (technical tool and manual inspection as well as discussed with the custodian).  You often find only a part of the database is still being used.  A good example I have seen was a highly customised category 4 LN app (my most complex app type), the technical tool detected the database was being used and had several customised components.  After speaking to the custodian, the LN app was simply being used to create new project codes.  If I had gone into a migration it would of cost a lot take considerable time and added little to no value.  Speak to the owner/custodian and get how important is it to them.   During the face to face review I use metrics to rate the database that can't be detected using technical tools.  For example how important is the tool?  Standard answer is critical.  How many users use the system?  After a few qu's you often find these category 4 applications are not fully used or few users use them or they are not that important so do they really need to be migrated.  As a rough guide after removing duplicates and weeding out unused databases about 30% of the original amount remain, this varies from client to client but as a general rule I mention this to the client.  Next figure out what needs to be migrated out of these remaining databases and which databases are providing the best returns to migration cost.  You will have to prioritise them unless you have a very large budget.

2.> Plan
You now know what databases need to be migrated, ensure that they all go to SharePoint, for instance a lot of companies use Documentum for document management, sure SharePoint can do it but is this the right place for your business/client.  Also a lot of these databases to be migrated are needed for regulatory or archival purposes.  SharePoint is not the cheapest or necessarily the best location.  It may be cheaper and easier to convert archive info into pdf documents and add it to the archive repositories.
Workout the source and the destination with the mapping.  As mention if the LN template is standard most tools can auto detect and add the appropriate target SharePoint template. 
Decide on how the data will be migrated (will you copy the entire live LN database), what about changes to data until LN is replaced.  I'd recommend freezing LN changes, copying some data and the nsf to a separate location.  Perform the mapping.  Try identify custom templates that are used repeatedly to ensure mapping time is reduced.  Define the destination.  Migrate the sample data and ensure the data is thoroughly tested.  Define your migration strategy, all at once?  I prefer piece at a  time.  Do you need training on the new system for the users?  Changes to migrated data after you copy.  Do you have enough time in migration windows to get all the data (terabytes potentially) perform the mapping and do a quick sanity check.  Do you have the SharePoint Infrastructure to handle the additional resource requirement?

3.> Implement
Ensure the new apps have been accepted by stakeholders and tested, users are ready to use the new apps, support is ready to handle requests, it's going to be change and people don't always like change so the servers can't go down, the apps need to be as easy to use as possible.  Implementations will take months and should be batched generally.  Also be ready if there is a disaster, can you get users back to LN, do you want them going back if something goes wrong.

There is more, a lot more but if you analyse and plan the implementation will be smother and succesful. 
For me the 2 most important points are: 1) plan, 2) people - get experiece people (business, project and technical).

Walch, Steve.  2011. 11 Ways to Migrate Lotus Notes Applications to SharePoint and Office 365 -

Monday, 20 February 2012

Determine SP2010 & SP2013 edition & patching Level

Problem: You go to a client to work o the farm and you need to know what the production farm is running i.e. SP2010 version and patching.  This also applied to moving data and features from QA to production.

Todd Klindt keeps a list of SP & OWA version numbers for SP2013.

Initial Hypothesis:  Use PowerShell to determine which edition of SP2010 is installed and the patching level.

PS> (get-spfarm).buildversion
PS> get-spfarm | select Products
OR Central Admin > System Settings > Servers on farm
Update 27 July 2013: Build 15.0.4481.1005 is SP2013 with the PU March 2013 (This PU is required before you install any subsequent CU's).  Build 15.0.4420.1017 is SP2013 without PU or CU's.
SP2013 with PU march 2013 and CU June 2013 shown below:
Product GUID Titles:
BEED1F75-C398-4447-AEF1-E66E1F0DF91E: SharePoint Foundation 2010
3FDFBCC8-B3E4-4482-91FA-122C6432805C: SharePoint Server 2010 Standard
D5595F62-449B-4061-B0B2-0CBAD410BB51: SharePoint Server 2010 Enterprise
B2C0B444-3914-4ACB-A0B8-7CF50A8F7AA0: SharePoint Server 2010 Standard Trial
88BED06D-8C6B-4E62-AB01-546D6005FE97: SharePoint Server 2010 Enterprise Trial
BC4C1C97-9013-4033-A0DD-9DC9E6D6C887: Search Server 2010 Trial
08460AA2-A176-442C-BDCA-26928704D80B: Search Server 2010
926E4E17-087B-47D1-8BD7-91A394BC6196: Office Web Companions 2010

Http header version unrelability post
PS script to check SQL and SharePoint. 
Reference List of SP2013 versions

Sunday, 12 February 2012

Checking the Sandbox solutions settings using Powershell

Display the sandboxed solutions service configuration settings:


foreach($tier in $uc.Tiers)
Write-Host "Tier Name: $($tier.Name)"
Write-Host "Tier MaximumWorkerProcess: $($tier.MaximumWorkerProcesses)"
Write-Host "Tier MaximumConnectionsPerProcess: $($tier.MaximumConnectionsPerProcess)"
Write-Host "Tier MaximumAppDomainsPerProcess: $($tier.MaximumAppDomainsPerProcess)"
Write-Host "Tier PriorityPerProcess: $($tier.PriorityPerProcess)"
Write-Host "Tier ResourceMaxValue: $($tier.ResourceMaxValue)"

Thursday, 9 February 2012

Authentication Evaluator

There are articles on building web parts to display claims on a page which can be a useful tool.

Below I have added my own, nothing new or exciting but part of my discovery on CBA:
The code to display the current users Claim is shown below:
There is a codeplex project that provides a web part that display the Claim token.  As the code is so short I'd rater write it myself.

Saturday, 4 February 2012

Presence Indicator not working

Problem: Presence indicator is not working in SP2010.

Initial Hypothesis: We have Office Communication 2007 installed.  I believe the presence indicator will also work if you are running Windows messanger on each client machine but our issue affected all our users in our test environment.

Resolution: A colleague, Greg Williams figured out how to fix the issue and I have posted it here to help others.  Neither the email address or the SIP are populated in the 'User Information' page (User Information List).
Here is the PS that fixed our issue, Brian Cartmel provided the PS:
$web = Get-SPWeb
## get the user information list
$list = $web.Lists | where { $_.Title -eq "User Information List" }
## get the system account item
$item = $list.Items | where { $_["Account"] -eq "i:0e.t|ADFS20|" }
$item["Title"] = "Paul Beck"
$item["SIP Address"] =

Explaination: "If the user does have a profile then the hyperlink will redirect to the user's main profile page under My Site. If the user does not have a profile, the hyperlink will redirect to the SharePoint Foundation 'User Information' page. All users in a site have a 'User Information' page, if they also have a User Profile the settings from the profile are synchronised down to the User Information page on a scheduled basis (by a timer job).
The key piece of information to make the presence work is the user's SIP Address which is basically their IM address (This is not always the same as email address). When a users is either added to a site in SharePoint or has their profile imported, the SIP Address will be drawn from Active Directory which is where OCS stores it and placed into the SIP address field in either the user's profile which will in turn synchronise down to the site's local 'User Information' page."  Martin Kearn

Tip: So as long as email or sip is populate with the email, the status indicator works.

More Info: (Read this)  Great blog and source of the Poweshell.

Wednesday, 1 February 2012

Overview:  CKSDev provides mutiple SPI for SharePoint, the Event Receiver SPI is very useful in saving me tome writing all the plumbing code.

Problem: While updating a custom list using my event receicer I am re-firing the event receiver for the item.

Initial HypothesisDisable the event firing as shown in this post.  This post applies to MOSS and the methods have been depreciated in SP2010.

Resolution: Disable the EventFiring
this.EventFiringEnabled = false;
// Perform update
this.EventFiringEnabled = true;

SharePoint 2010 enable the scope immediately

Problem:  After creating a new scope, you need to wait 15 minutes for it to update the new scope (default SP2010 setting is: Automatically scheduled).

Initial Hypothesis: Gary Lapointe use to have a stsadm cmd to push thru the scope but I wanted to do it using PowerShell.  You can also use the Central Admin UI:

PS> $ssa = Get-SPenterpriseSearchServiceApplication
PS> write $
PS> $ssa.StartScopesCompilation()

Technet has a post on forcing the scopes to update.

More Info: