The SharePoint Administration Service and SPAdministrationServiceJobDefinition

The Timer Service Recycle, Password Management, and Application Server Administration Service recurring timer jobs all derive from the SPAdministrationServiceJobDefinition class. We'll begin here by presenting and discussing this special timer job class and the SharePoint 2010 Administration Windows service with which it interacts. Then we will discuss these jobs in detail.

SharePoint 2010 Administration Service

The SharePoint 2010 Administration Service is a Windows service installed by SharePoint. The service's name is SPAdminV4 and its primary executable is WSSADMIN.EXE in the 14\BIN directory. The task of the SharePoint Administration service is remarkably simple: it handles a specific subset of operations (exposed as methods of the SPAdministrationOperation object) which require local administrator rights on a server. The Timer Service uses an IPC (Inter-Process Communication) channel to call upon the Administration Service to execute these operations.

Operations carried out by the Administration Service include service-related tasks such as restarting Windows services and IIS application pools; creating folders and files and configuring their permissions; adding and removing accounts from local security groups; and creating and modifying values in the Registry.

The Administration Service cannot do anything other than its preconfigured subset of operations. In addition there is no supported way for a third-party timer job to directly call these methods - only internal SharePoint jobs may utilize them. As a result, this discussion of the Administration Service and SPAdministrationServiceJobDefinition is meant only to help you troubleshoot and understand existing SharePoint Administration Service jobs; there is no purpose in writing your own jobs of this type.


SPAdministrationServiceJobDefinition is a class for SharePoint timer jobs which derives from SPJobDefinition, the base class for all SharePoint timer jobs introduced in the first post in this series. SPAdministrationServiceJobDefinition is used to create jobs which will utilize the SharePoint 2010 Administration Service (SPAdminV4) for some of their operations. It is important to note that the job is still in fact run by the standard timer service and doesn't have to utilize the Administration Service at all. To actually utilize the Administration Service, it's up to the job's implementation to explicitly call one a designated administration operation.

By deriving from SPAdministrationServiceJobDefinition, a job indicates to the Timer Service that it intends to utilize the Administration service for some of its operations. This allows the Timer Service to check if the Administration service is in fact running on the server before scheduling the job; if it is not, an alert can be logged and the job is not scheduled.

To list all recurring and one-time Administration Service jobs currently configured in the farm, run the following PowerShell command:

PS:> Get-SPTimerJob | ? {($_ -is [Microsoft.SharePoint.Administration.SPAdministrationServiceJobDefinition])}

Note that there are not many recurring Administration Service timer jobs. Most Administration Service timer jobs are one-time jobs to create or copy files, restart services, set configurations, etc.

Another benefit of deriving from SPAdministrationServiceJobDefinition is that Administration Service jobs can be singled out for independent execution when needed. For example, to increase security in some farms the Administration Service is stopped and only started specifically when local administration jobs need to be executed. In these scenarios the Administration Service is started and Start-SPAdminJob PowerShell cmdlet (or STSADM -o ExecAdmSvcJobs) is called. Use the -Verbose parameter with this cmdlet to cause it to output information about each job run.

To help you better understand which jobs require the Administration Service, following is an abbreviated list of their type names, which for the most part are self-describing. Most of these are configured as one-time jobs when needed. To retrieve a list of configured timer jobs by type name, you can run the following PowerShell command:

PS:> Get-SPTimerJob | Format-Table Name, @{Label="Type";Expression={$_.GetType().FullName}}

























The next post will describe the Timer Recycle Job and how it utilizes the Administration Service.