SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to get all local contentdeployment jobs from within web application code?

I'm trying to list all jobs on an aspx page in the backend of a site collection, but everytime I execute this:


an AccessDenied Exception raises, saying that the executing user is not a farm admin. If I try it with ElevatedPriviliges or Impersonation as farm admin it doesnt work too.

share|improve this question
Already found a solution for this? – Ole Albers Dec 6 '12 at 14:18
up vote 0 down vote accepted

After a few months of not thinking about this issue I found an answer:

Execute the following PowerShell Script and it should work (tested on a standalone farm):

PS C:\Users\xxx> $contentService  = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
PS C:\Users\xxx> $contentService.RemoteAdministratorAccessDenied = $false
PS C:\Users\xxx> $contentService.Update()

Here my testing code (executed in a webpart):

    ContentDeploymentJobCollection jobs = ContentDeploymentJob.GetAllJobs();
    foreach (ContentDeploymentJob job in jobs)
 catch (Exception ex)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.