Tuesday, July 3, 2012

sharepoint powershell run timer job

In sharepoint deployment automation is the one of the key parts of development.

One of the key features of sharepoint is to create timer job which will execute a process at regular intervals of time.

Here comes the interesting part is to automate the timer job deployment.

There are 2 options for that.

1. Using Sharepoint object model which we will execute from the Feature activation.

2. Using powershell script which we can put as deployment files.

Here is the peace of code.

$WebApp = Get-SPWebApplication http://siteurl
$job = Get-SPTimerJob | ?{$_.Name -match $JobName} | ?{$_.Parent -eq $WebApp}

Thank you !!


  1. Such a wonderful post. Sharepoint Development is one of the most popular application development now-a-days. We are also providing some good tips related to this post.Great work.

  2. Thank you very much for the appreciation. I will keep posting of articles in further also...

  3. Thanks Mr kanchria to share this informative post on sharepoint development,

    Armen Chircorian
    how to publish a book