In my last post on managing the throttling settings on your web application we started talking about some of the properties of web application object to restrict resource usage on your portal.
In this post I would like to add few more useful knobs and dials that you can leverage from the object model or PowerShell; in this example I will use PowerShell and connect to my web application:
Open SharePoint 2010 Management Shell and execute the following:
$site = spsite "http://[your site collection URL]"
Now that you got a hold of the SPSite, we’ll access the properties of the parent web application.
For example, here is how to enable or disable user defined workflows which users can create using SharePoint Designer on the site. These workflows cannot add code. They can only reuse code already deployed by the administrator.
$site.WebApplication.UserDefinedWorkflowsEnabled = "true"
From the Central Administration you can manage workflow settings with this UI:
Another useful setting is the maximum number of items that can be checked in a Cascade or Restrict delete operation. Applicable to lists which have referential integrity enabled in them.
$site.WebApplication.CascadeDeleteMaximumItemLimit = [# of items]
Along with the CascadeDeleteTimeoutMultiplier property, the CascadeDeleteMaximumItemLimit property controls the duration of a short-term Web site lock that is taken to perform referential integrity delete operations.
Ah, and finally something you probably alway wondered about, how long will the “New!” icon appear beside newly created documents and list items:
$site.WebApplication.DaysToShowNewIndicator = [# of days]
Enjoy!
