Adding the last modified date on a publishing page

February 6, 2013 Leave a comment


A comment requirement for corporations is to display the modified date of a publishing page on the actual page itself.  The way we do this is to add a placeholder on the master page that we populate in the page layout.

To add the field, use the following code:

<SharePointWebControls:DateTimeField id="pageContentUpdate" FieldName="Modified" runat="server"/>

I highlighted the field type DateTimeField, because you can actually display the field using the standard FieldValue type as follows:

<SharePointWebControls:FieldValue id="pageContentUpdate" FieldName="Modified" runat="server"/>

This worked great, until I realized the time displayed on the page layout was 5 hours behind the actual modified date Disappointed smile.

Categories: SharePoint Tags:

Live Writer Draft Folder

November 21, 2012 1 comment

So I recently moved all my documents to SkyDrive – love it.  Can get to them from all machines, including Android, windows phone and Surface.  Then I rebuilt my machine and all my docs were right there… except for the hundreds of draft blogs that I never posted.  Now you can imagine the state of panic I was in, given that I am a frequent semi-annual blogger!

Live Writer, great and all as it is does not give you an option to specify your folder to store blog files.  It’s <user>\documents\My Web Logs and that’s it.

So a little bit of Bingaling and I found how to change this through the registry (thanks to Larry).

It’s a quick modification to the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer\PostsDirectory

By default this key does not exist, so you will need to create it.

1. Open up regedit

2.Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer

3. Right click on the “Writer” folder in the left pane and choose New > String Value

4. Name the value PostsDirectory and then double-click on it to edit

5. Enter your new location (<user>\SkyDrive\LiveWriter for example)

6. Save


Alternatively you can do it through PowerShell:

New-ItemProperty “HKCU:\Software\Microsoft\Windows Live\Writer” -Name “PostsDirectory”  -value “C:\Users\<user>\SkyDrive\Live Writer”



Categories: Uncategorized Tags:

SharePoint 2013 Farm setup–and we are off!

September 16, 2012 Leave a comment

Applies to: SharePoint Server 2013

Like many other SharePointies, I’ve decided to setup a lab environment so I can play around with the new features first hand. 

Lucky, my mate Andrew Connell has an excellent guide on getting setup for a development environment.  This takes you through the process from end-to-end. 

I already have a Hyper-V environment and a dedicated SQL server, so I could skip stright to installing SharePoint.

I created a new vm using Windows Server 2012 as the OS.  I still don’t get why MS do not include buttons instead of requiring the mouse to be in specific location of the bottom left/right corner.  The majority of admins remote to their servers, so this is nothing but a pain.  Anyways, enough about that, Microsoft probably spent millions over this very topic, so I’ll just suffer until popular demand forces them to add them in an a service pack Smile.


My plan is to follow best practices and use an install account and a farm account to get started.  The install account has dbcreator and security admin roles in SQL.

After successfully running the pre-config and getting all the required roles and bits in place, I ran the installer. All is good so far. Next I get to configure SharePoint 2013.  For 2010, I would skip to using PowerShell at this point, but I want to see what the config wizard does for SharePoint 2013.

Oh look, you can define your Config database name.  how novel!  I do that, and provide the rest of the configuration values and of I go.

Configuration Failed

An exception of type Microsoft.SharePoint.SPException was thrown… This SQL Server instance does not have the required “max degree of parallelism” setting of 1.  Database provisioning operations will continue to fail if “max degree of parallelism” is not set to 1 or the current account does not have permissions to change the setting.

See my other post on this issue and how to get over it.

The configuration wizard takes several minutes to run (more than 10 for me).  Yay.  Configuration completed without error.  Lets see what databases it created:

Configuration database: SP2013_Config

Admin contnet db: SharePoint_AdminContent_93725166-c75a-4e48-8bae-445bab7ffad7

Ugh. Again with the GUIDs.  Ok, back to Central Admin. 

First Question: Do I want to sign up for the customer experience Improvement Program.  No. 

Second Question: How do you want to configure your SharePoint farm? Wizard or manually?

Again, I’d normally do this with PowerShell, but I want ot see how te wizard does, so wizard it is.



The following services are configurable using the wizard:

  • Access Services 2010
  • Access Services
  • App Management Service
  • Business Data Connectivity Service
  • Excel Application Service
  • Lotus Notes Connector
  • Machine Translation Service
  • Managed Metadata Service
  • PerformancePoint Service Application
  • PowerPoint Conversion Service Application
  • Search Service Application
  • Secure Store Service
  • State Service
  • Usage and Health Data Collection
  • User Profile Service Application
  • Visio Graphics Service
  • Word Automation Services
  • Work Management Service Application

I also specify a dedicated services application account.  Though the services wizard only allows you to specify one service account, in a production environment, I would use several.

Other than Access, BDC, Lotus notes Connector, Machine Translation, PerformancePoint, PowerPoint conversion, and Word Conversion, I am going to have the wizard create the rest.

I click Next and get this:


SharePoint 2013 is now working on it and is sorry to keep us waiting. Disappointed smile

Glad to see the following hasn’t changed from 2010.  My buddy James Sturges crack us every time he sees this.


It take a while for the wizard to complete.  But you will know it’s working as you watch several database with GUIDs in the name get created.  Lovely.


Eventually, you are asked to create a site collection.  I’m going to go ahead and create one at the root site. I’m going to use the 2013 experience and use the publishing portal template.



After the site collection wizard is complete, I am brought back to Central Admin home page.

I browse to the new site collection to make sure it’s up…




Ok, that’s it for the Farm configuration.  ‘til the next SharePoint 2013 post…

Categories: SharePoint

SQL Server instance does not have the required “max degree of parallelism” setting of 1

September 16, 2012 2 comments

Applies to: SharePoint Server 2013

When setting up a SharePoint 2013 lab, I ran into the following error while running the configuration wizard:

An exception of type Microsoft.SharePoint.SPException was thrown… This SQL Server instance does not have the required “max degree of parallelism” setting of 1. Database provisioning operations will continue to fail if “max degree of parallelism” is not set to 1 or the current account does not have permissions to change the setting.

Ok then. So what is “max degree of parallelism” that has SharePoint all bent out of shape? Well, according to Mat Stephen:

This option sets the maximum number of processors SQL Server can use for one query. If SQL Server has to bring back a lot of data (lots of rows) for a query it sometimes makes sense to break the query down into a number of smaller queries, each query returning a subset of the total rows. This way SQL Server can make use of more than processor and hence on multi processor boxes it can potentially return a lot of rows more quickly, for a given query, than it can on a single processor box.

The default value of 0 will allow SQL to use all of the processors for parallelism. Setting this value to 1 will basically disable parallel planning, with only one processor being used.

Ok, so lets’ set it to 1 and get back to business.

From SQL server management Studio, right click your server in Object Explorer and click Properties. Under the Advanced group modify the property “Max Degree of Parallelism”.


Because the database was already created, I will need to delete and re-create it and run the config wizard again.

Note: Were I using a highly privileged account (like farm, or domain admin) I would not have come across this error as SharePoint would simply have changed the value for me without me knowing. This is why I follow least privilege practices even in my lab.

Setting this to 1 got made SharePoint happy and the configuration continued normally.

Categories: SharePoint

Maintaining a hybrid licensing model in a single farm

September 13, 2012 Leave a comment

Applies to: SharePoint 2010

When installing SharePoint, one of the first things you have to do is enter a license key.  For most companies this is not even a consideration, it’s either a standard license or an enterprise license. 

Check out the Microsoft SharePoint 2010 feature matrix to see what enterprise gets you.

So, what if you want to deploy a hybrid model and have some users on standard and some users on enterprise?  Well it gets tricky.  For large companies this is a situation that is not as uncommon as you might think. 

Once you active the enterprise license, you cannot revert your farm to a standard license.  With that in mind, how do you maintain both sets of licenses?

I won’t get into the details of licensing and cost – that’s for you to work out with your Microsoft account manager Smile. I will however touch on how can you govern it technically.

So how are enterprise features implemented?


A Site collection feature called SharePoint Server Enterprise Site Collection features will enable all the additional features that comes with Enterprise for that site collection.


By default this is disabled, unless you chose to have it enabled through Central Admin (Upgrade and Migration > Enable Enterprise Features).

Service Applications

Enterprise includes several service applications including excel services, access services, etc.  Web applications that are associated with these services can put them to use. See the feature matrix for all the services that are included.

So how to make the most of a hybrid deployment and stay in compliance?

Well this is where it gets tricky.  There are several configurations you can consider, but you also need the support and compliance of your site owners.

Technical Governance

Web Applications – To maintain a hybrid license model, you need to do so at the web application level.  Target your features per web application.  i.e. A web application can have standard features or enterprise features.  By doing so you can restrict the service applications available.

Proxy Groups – Separate your service applications into proxy groups.  do not mix features that are enterprise with standard in the same group.  Apply the proxy groups to the web applications accordingly.

Site Collections – Do not enable the site collection feature to automatically enable enterprise features.  Enable this only for sites that need it.

Policy Governance

Technical governance will only get you so far, users are smart and can often find ways around your limitations. 

Site Collection Administrators – Consider restricting the SA admins to the IT group.  Educate your admins on licensing and feature enabling.  If you do give over SA admin to your users, ensure they know that if they go outside their license, it may be revoked.  Or if they really need the enterprise features, they provide a case for it.

And of course there’s always custom solutions to ensure enterprise features are never enabled.

Brian Edwards has a great article that gets into much more detail.  You should check it out.

Categories: SharePoint

Linking accounts in

August 1, 2012 Leave a comment

If you recently switched to the shiny new from, you may be getting used to the new super-clean UI and navigation.  One thing I liked with was the ability to link accounts, so you can easily switch from one Hotmail accounts to the other.


I thought they had removed this from the new, but eventually found it buried under settings.

To link an account:


From your username menu, select Account Settings

On the Microsoft Account page, you will see a link to Manage Linked Accounts


Here you can add other hotmail/live/outlook accounts.

Happy linking!

Categories: Uncategorized

SharePoint User Information list is not being updated

March 2, 2012 1 comment

There are many blogs out there explaining the various locations of user properties in SharePoint. Mainly the UPA and the site collections hidden list called the User Information list (http://<SiteCollectionUrl>/_catalogs/users/detail.aspx)

When a user hits this site collection, they will automatically get a profile entry in this list.  Ok, great.  But you have profile properties in two places now, the site collection(s) and the User Profile Service Application; how are you supposed to keep them in sync?

As it turns out, SharePoint thought of that and gives us two timer jobs to do exactly that.  These timer jobs are the User Profile to SharePoint Full Synchronization, and the User Profile to SharePoint Quick Synchronization.


Nice, were good then.  Ok, so what happens when they don’t sync? 

I recently did a migration where we moved 2007 databases to a 2010 farm.  The profiles moved over fine as did the permissions.  However neither the quick or full sync, would work.  It did at one point, but promptly stopped.  No amount of manually running the timer job made a slight bit of difference.

No problem, I’m sure there’s a PowerShell script for that. Nope.  Couldn’t find anything.

So how does SharePoint keep the site collection user lists and the UPA profiles in sync?

When the timer job updates the site collections with the profile properties, it maintains the sync details in a table.  Each database will have a sync table containing this information.  Stsadm.exe provides a command (sync) to view these tables:

Stsadm.exe –o sync –listolddatabases 0

This will display all the databases and when they have been sync’d last.



The sync command also allows you to clear these tables:

Stsadm.exe –o sync –deleteolddatabases 0

Funny thing is it doesn’t actually delete databases, just  the sync info.  The team that named this param were having a right laugh.

Anyways, running this will basically tell the timer jobs that they have never sync’d and force them  to carry on as if it’s the first time.

Make your way over to the timer Jobs page under Monitoring in Central Admin and fire off the User Profile to SharePoint Full Synchronization job.  It will take a lot longer to run this time and should fix the sync issue.

So once again stsadm.exe comes to the rescue. 

If that still doesn’t’ work, you can try Gary Lapointes blog on re-writing them using PowerShell.

SharePoint Build: 2010 SP1 June CU refresh (14.0.6109.5002)

Categories: SharePoint Tags: ,