I have a web application in 2007 that contains a bunch of sites that all used a custom site definition and a custom master page (deployed using a feature). All is well.

I've upgraded the code for 2010, changed the master page to add the ribbon and all that jazz, and do the database detach/reattach method to upgrade the content database for 2010. Everything is where I'd expect it to be and the custom master page is in the master page gallery (and when I view it in Designer it opens successfully and has the new look and feel, so it's definitely finding the right file).

The problem is, the site itself is using v4.master. If I use PowerShell to switch MasterUrl and CustomMasterUrl to my custom master page, everything works fine, but why would the upgrade process force it back to v4.master? There are thousands of sites in this web application, and I'd rather not have to run a powershell script after the upgrade that manually makes the change. Has anyone else tried to upgrade a site that uses a custom master page with the -preserveolduserexperience switch set to false and had a similar issue?

2 Answers 2


The effect of visual upgrade is to switch in the v4.master. This happens even if the old master page wasn't default.master. So if you have a custom master page you can't really do the visual upgrade thing - presumably this is for people using mainly the standard master pages.

You can retract the visual upgrade using PowerShell:

Get-SPSite http://machinename/sites/V3UI | Get-SPWeb "webname" | Foreach{$_.UIVersionConfigurationEnabled=1;$_.UIVersion=3;$_.Update();}
  • Hmm, good to know. So I guess there is no way around the manual setting of the master page after upgrading. At least I have that functionality in a feature, so I just need to script the sp-enablefeature in powershell. Thanks!
    – Chris
    Jun 14, 2011 at 16:09

I found this article that might help with a powershell script: http://vasya10.wordpress.com/2011/03/26/upgrading-to-sharepoint-2010-look-and-feel/

“The script iterates over all the sites and sub-sites, remembers their old master pages, switches to v4.master and resets the sites to old master pages. In effect, the Site Settings and other pages will have the SP 2010 look and feel.”

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.