This tip is for SharePoint Foundation 2010, SharePoint Server 2010 and Search Server 2010 Express.
So you have your heart set on the WSS 3.0/MOSS 2007 look; I know, how could you not just looooove it? But have just installed a fresh new SharePoint 2010 farm. Or, you have visual upgraded your sites after an upgrade from WSS 3.0/MOSS 2007 to SharePoint 2010 and want that 2007 look and feel. So how can you go back?
As it turns out, it’s easy with the power of PowerShell. The scriptlets below will show you how you can switch from version to version for every site in a site collection and to switch a single site.
To change the look and feel for every site in a site collection to WSS 3.0/MOSS 2007, use the following example code:
$SiteCollection=Get-SPsite http://SiteCollection foreach($SPWeb in $SiteCollection.AllWebs){$SPWeb.UIversion=3;$SPWeb.update();}
To change the look and feel for every site in a site collection to SharePoint 2010, use the following example code:
$SiteCollection=Get-SPsite http://SiteCollection foreach($SPWeb in $SiteCollection.AllWebs){$SPWeb.UIversion=4;$SPWeb.update();}
To change the look and feel for 1 site in a site collection to WSS 3.0/MOSS 2007, use the following example code:
$SPWeb=Get-SPWeb http://Site
$SPWeb.UIversion=3;$SPWeb.Update();
To change the look and feel for 1 site in a site collection to SharePoint 2010, use the following example code:
$SPWeb.UIversion=4;$SPWeb.Update();
So now you can go back and forth all day basking in your new found Visual Upgrade power! Next, SharePoint 2010 with laser beams!
UPDATE 8:39P 9/21/2010 - Looks like the SharePoint Team blog post has been updated with new information. While you could do the steps below for WSS 3.0/MOSS 2007, they are not needed. Only SharePoint 2010 and WSS 2.0 are affected.
There have been some questions on whether or not WSS 3.0 and MOSS 2007 are affected by the Microsoft Security Advisory 2416728. Since the reported vulnerability deals with .Net Framework, specifically ASP.NET and error pages WSS 3.0 and MOSS 2007 may be affected (see above for update).
The SharePoint Team blog has some workaround steps for SharePoint 2010 that help to mitigate the attack. So what are the steps for WSS/MOSS? If you read the advisory, it becomes clear that there are 2 things that are needed for the workaround.
So what are the steps? Well, they are almost identical to the SharePoint 2010, with 2 minor differences.
<%@ Page Language="C#" AutoEventWireup="true" %> <%@ Import Namespace="System.Security.Cryptography" %> <%@ Import Namespace="System.Threading" %> <script runat="server"> void Page_Load() { byte[] delay = new byte[1]; RandomNumberGenerator prng = new RNGCryptoServiceProvider(); prng.GetBytes(delay); Thread.Sleep((int)delay[0]); IDisposable disposable = prng as IDisposable; if (disposable != null) { disposable.Dispose(); } } </script> <html> <head runat="server"> <title>Error</title> </head> <body> <div> An error occurred while processing your request. </div> </body> </html>
<customErrors mode="On" redirectMode="ResponseRewrite"defaultRedirect="/_layouts/error2.aspx" />
If .Net Framework 3.5 or less is installed change the line to;
<customErrors mode="On" defaultRedirect="/_layouts/error2.aspx" />
The reason that the web.config customErrors line is different for computers with .Net 3.5 or below is that the redirectMode property was not available before .Net 3.5 SP1.