Home > Uncategorized > Update the UI quick on ALL subwebs with SPWeb.UIVersion

Update the UI quick on ALL subwebs with SPWeb.UIVersion


When you migrate SharePoint 2007 to 2010, it sometimes happens that the UI gets ‘stuck’ in v.3.0 mode. When you move a database from 2007 and do an attach upgrade, you have a choice to use the -UpdateUserExperience flag when you run the Mount-SPContentDatabase command. This is usefull so that you don’t have to manually update the Visual UI, but this flag can be dangerous as well.

I have used it and sometimes, it causes most sites UI to be upgraded to v.4, but not all. On the not upgraded, the option to upgrade the visual UI is gone which puts you in the spot a bit.

For this occasion, I created this short but effective snippet:

$SPSite = Get-SPSite http://MySiteCollection
foreach ($SPWeb in $SPSite.AllWebs)
{
    $SPWeb.UIVersion = 4;
    $SPWeb.Update();
}

Done!

Stay tuned!

Regards

 

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: