The object cache stores properties about items in SharePoint Server 2010/2013. Items in this cache are used by the publishing feature when it renders web pages. The goals of the object cache are to reduce the load on the computer on which SQL Server is running, and to improve request latency and throughput. The object cache makes its queries as one of two out-of-box user accounts: the Portal Super User and the Portal Super Reader (SharePoint cache accounts). These SharePoint cache accounts must be properly configured to ensure that the object cache works correctly. The Portal Super User account must be an account that has Full Control access to the web application. The Portal Super Reader account must be an account that has Full Read access to the web application.

You can use the below script to automatically grant the cache accounts the required permissions and add these for all web applications.

$webapps = Get-SPWebApplication
$SuperUserAcc = “i:0#.w|peet\sp2013_superuser”
$SuperReaderAcc = “i:0#.w|peet\sp2013_superreader”
foreach($webapp in $webapps)
[Microsoft.SharePoint.Administration.SPPolicyCollection]$policies = $webapp.Policies
[Microsoft.SharePoint.Administration.SPPolicy]$policy = $policies.Add($SuperUserAcc, "Super User (Object Cache)")
[Microsoft.SharePoint.Administration.SPPolicyRole]$policyRole = $webapp.PolicyRoles | where {$_.Name -eq "Full Control"}
[Microsoft.SharePoint.Administration.SPPolicy]$policy = $policies.Add($SuperReaderAcc, "Super Reader (Object Cache)")
[Microsoft.SharePoint.Administration.SPPolicyRole]$policyRole = $webapp.PolicyRoles | where {$_.Name -eq "Full Read"}
$["portalsuperuseraccount"] = $SuperUserAcc
$["portalsuperreaderaccount"] = $SuperReaderAcc



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.