We are working with a SP 2007 content database that we have upgraded to SP 2010 via database attach.
I wanted to perform the visual upgrade to one of the site collections in the content database.
However, I don't want to do it site by site manually. So I went to http://technet.microsoft.com/en-us/library/ff607998.aspx and I tried to execute this:
PS C:\Users\sa_spsdev> get-spdatabase | ?{$?.Name -eq "SharePoint_WWW_Content_1"} | add-spshelladmin -username cas\sa_spsdev
PS C:\Users\sa_spsdev> $site = get-spsite
http://ntsrv45sb/sites/eo
PS C:\Users\sa_spsdev> $site.VisualUpgradeWebs()
Exception calling "VisualUpgradeWebs" with "0" argument(s): "Access is denied.
(Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
At line:1 char:24
+ $site.VisualUpgradeWebs <<<< ()
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException