Visual Upgrade all Webs in Site Collection with Powershell

Reading Time: < 1 minute

While upgrading to SharePoint 2010, if you have chosen not to upgrade to the new user experience at upgrade time, you can upgrade all webs in a site collection after-the-fact with the following script:

Add-PSSnapin Microsoft.SharePoint.PowerShell

$site = Get-SPSite(”http://SiteCollectionURL“)
foreach ($web in $site.AllWebs) { $web.UIVersion = 4; $web.Update() }


    1. Hi SP Admin,

      Its been a while since I’ve done this, but when I look back thru my reference notes, it appears that it should work. Unfortunately, I don’t have a new SP2010 environment upgraded from SP2007 to test.

      There is also a VisualUpgradeWebs() method on a site collection object you can try as well that will upgrade all webs in the site.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.