| Visual Upgrade is capability in SharePoint 2010 that allows you to view upgraded sites as they looked in SharePoint until you are ready to view them in their full SharePoint 2010 glory. Your reasons for this might be user education, or the need to update customizations you have. The Visual Upgrade is scoped at the web level, so all the pages in a web can be rendered as SharePoint 2007 or as SharePoint 2010. There are a few ways to control this. The easiest way is inside of the UI itself, and that is probably how Site Collection administrators will control how webs are rendered. Another option is Windows PowerShell. PowerShell is a great way to take care of this if you have to work with a lot of webs. It has looping capabilities that make this very easy. One scenario were you might want to do this is what a Database Attach upgrade. In this situation you have a SharePoint 2007 (SP2 or later) content database that you attach to an existing SharePoint 2010 farm. While you can force the SharePoint 2010 on the content of this content database when you attach it, that gives you less flexibility. If you choose to preserve the SharePoint 2007 UI you'll need to switch it to the SharePoint 2010 interface eventually. The PowerShell script below will take a Content Database name and determine all the Site Collections in that db. It will then walk through all the webs in those Site Collections and set them to the SharePoint 2010 interface. Let's take a look at it:
$db = Get-SPContentDatabase WSS_Content_SharePoint_2007
$db.Sites | Get-SPWeb -limit all | ForEach-Object {$_.UIversion = 4; $_.UIVersionConfigurationEnabled = $false; $_.update()}
The first line creates a variable, $db, and assigns it an object that represents the content database. Once we have that object, we can use the Sites property to get a list of all the site collections stored in it. Using pipes, we pipe the Site Collection objects through Get-SPWeb to get each web (SPWeb) for each site (SPSite). Once we get the web, we can set the UIversion property of that web to the version we want displayed. Setting the value to 4 gives us the SharePoint 2010 interface. If you want the SharePoint 2007 interface, set UIversion to 3. The next part, $_.UIVersionConfigurationEnabled = $false removes the "Visual Upgrade" option from the Site Actions dropdown. This keeps users from going in and setting the UI back to the SharePoint 2007 interface. Finally we need to execute $_.update() to write our changes to the web.
That's all there is to it. Now all the webs in that upgraded Content Database are using the SharePoint 2010 interface.
tk |