One of the things you may see in your event logs if you’re using the WCM features of SharePoint 2010 is a Warning event with ID 7362:
Object Cache: The super user account utilized by the cache is not configured. This can increase the number of cache misses, which causes the page requests to consume unnecessary system resources.
It goes on to say: To configure the account use the following command ‘stsadm -o setproperty -propertyname portalsuperuseraccount -propertyvalue account -url webappurl’.
Sure, I could easily type that STSADM command into my boring old CMD.exe window and solve the issue and ensure that my caching works perfectly. OR… I could play with my favorite tool, PowerShell!
After a little bit of playing, I discovered that you can do the following to set the super user account using PowerShell:
$wa = Get-SPWebApplication http://myspwebapp
Take that STSADM!