Monday, March 05, 2012

The specified user or domain group was not found.

I started getting the error "The specified user or domain group was not found" after I restored a SP 2007 site to SP 2010 with claims authentication.

The event log had the above error followed by the following error:
Object Cache: The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases.
To configure the account use the following command 'stsadm -o setproperty -propertyname portalsuperreaderaccount -propertyvalue account -url webappurl'. It should be configured to be an account that has Read access to the SharePoint databases.
Additional Data:
Current default super reader account: NT AUTHORITY\LOCAL SERVICE

To fix the error I had to run the following Power shell commands:
$wa = Get-SPWebApplication -Identity "http://yourwebapp"
$wa.Properties["portalsuperuseraccount"] = "domain\cacheuser"
$wa.Properties["portalsuperreaderaccount"] = "domain\cacheuser"
$wa.Update()

Thursday, October 13, 2011

Setting the search center Url for a site collection using powershell

$web = get-spweb “url of site collection”

$web.AllProperties["SRCH_ENH_FTR_URL"] = http://searchcenter/pages

$web.Update()

Moving a SharePoint site collection as a sub-site of another site collection

Moving a site collection to be a sub-site of another site collection can be achieved by exporting the site collection data and importing it as a sub-site.

Below are the steps:

  • Open up a SharePoint 2010 Management Shell
  • Execute the following PowerShell command to export the site collection

export-spweb “site collection url” -path “export filename” -includeusersecurity –includeversions All

  • Create a sub-site at the destination location with a blank site template
  • Execute the following PowerShell command to import the site collection to the sub-site

Import-spweb “sub-site url” -path “export file name”