Thursday, November 10, 2011

Error while visual upgrade

After mounting MySites DB, we performed the visual upgrade using the commands below:

$webapp = Get-SPWebApplication <web apps url>
foreach ($s in $webapp.sites)
{$s.VisualUpgradeWebs() }

but encountered the below error

Exception calling "VisualUpgradeWebs" with "0" argument(s): "Access is denied.
(Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
At line:2 char:22
+ {$s.VisualUpgradeWebs <<<< () }
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException

This is because at least one or more of the site collections are in read-only.

To find out which ones, run the commands below

$webapp = Get-SPWebApplication <web apps url>
foreach ($s in $webapp.sites)
{$s | Get-SPSite  | Where {$_.readonly -eq "true" }} ; readonly is the column name !!


We then need to unlock those sites

Set-SPSite -Identity <site collection url> -LockState unlock

2 comments:

  1. Read was interesting, stay in touch…...

    [...]please visit the sites we follow, including this one, as it represents our picks from the web[...]…...

    ReplyDelete
  2. thanks, this was really helpful.

    ReplyDelete