Running SharePoint timer jobs from PowerShell

We are currently moving from using stsadm to using PowerShell for our SharePoint installation scripts.

We were unable to find an equivalence to this:

stsadm -o -execadmsvcjobs 

We tried to pause, but it depends on the length of the pause.

Is there an equivalent command in PowerShell, or can we run this command from PowerShell?

+4
source share
3 answers

Check out the Start-SPAdminJob here

According to this article , this is the equivalent of execadmsvcjobs.

+6
source

Try using something like this:

 $wa = Get-SPWebApplication $url Get-SPTimerJob | ?{$_.Name -match "VariationsCreateHierarchies"} | ?{$_.Parent -eq $wa} | Start-SPTimerJob 

This snippet launches the Create Variables task for a web application in $ url

+1
source

All Articles