SPWindowsService class
Represents a Windows service that is installed on one or more servers in the server farm.
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.Administration.SPPersistedObject
Microsoft.SharePoint.Administration.SPPersistedUpgradableObject
Microsoft.SharePoint.Administration.SPService
Microsoft.SharePoint.Administration.SPWindowsService
Microsoft.SharePoint.Administration.SPDatabaseService
Microsoft.SharePoint.Administration.SPTimerService
Microsoft.SharePoint.Administration.SPTracingService
Microsoft.SharePoint.Administration.SPUserCodeService
Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheService
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Windows services enable you to create long-running executable applications that run in their own Windows sessions, can be automatically started when the computer starts up, can be paused and restarted, and do not show any user interface. Windows services are ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer. Windows services are the type of services listed in the Services snap-in within the Administrative Tools for a server.
To return the parent Windows service of a Windows service instance, use the inherited Service property of the SPWindowsServiceInstance class. Use the Services property to get a specific Windows service that is implemented within the server farm.