There are plenty of other posts out there that do an excellent job of explaining the concept of Sandboxed solutions and absolute limits so I’m not going to re-hash what others have done well. What I haven’t seen is a good explanation of how to update / change / modify the values of the ResourceMeasures like the AbsoluteLimit or AbnormalProcessTerminationCount and others using PowerShell.
TechNet lists what the default quotas are for each measure so there is no need to duplicate it but I will list each measure in case people are looking for them. Check out http://technet.microsoft.com/en-us/library/ff603636.aspx for more information.
Here is the PowerShell commands I used to change the values –
PS C:\ >$spcode = [Microsoft.SharePoint.Administration.SPUserCodeService]::Local
//This command will cache “[Microsoft.SharePoint.Administration.SPUserCodeService]::Local” so you don’t have to keep typing it.
PS C:\> $spcode.ResourceMeasures | select name, ResourcesPerPoint, AbsoluteLimit
//This will display a list of ResourceMeasures and their current ResourcesPerPoint and AbsoluteLimits, I am showing these values since they were the ones I needed to modify.
PS C:\> $abnormal = $spcode.ResourceMeasures[“AbnormalProcessTerminationCount”]
//This will cache the ResourcesMeasure AbnormailProcessTerminationCount
PS C:\> $abnormal.ResourcesPerPoint = 10
PS C:\> $abnormal.AbsoluteLimit = 20
//Please note that I am not actually advocating or recommending that these values be changed especially so drastically.
PS C:\> $abnormal.Update($True)
//This will commit the changes you’ve made. This is also the command that seems to be missing from other instructions I’ve seen online.
PS C:\>$spcode.ResourceMeasures | select name, ResourcesPerPoint, AbsoluteLimit
//To view the changes you have made.
Hopefully others will find this useful.