SPUserCodeService.IsEnabled property
SharePoint 2013
Gets a value that indicates whether the current service is provisioned and running as expected.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Property value
Type: System.Booleantrue if the current service is provisioned and running as expected; otherwise, false.