Wednesday 11 April 2012

Disable All Content Deployment Jobs

Just a quick script drop we have around 20 content deployment jobs that require disabling and enabling when we are service packing / upgrading.  This number is increasing constantly and will eventually be quite large.  Here is a one liner to disable and re-enable your content deployment jobs, I have two ps1 files on the server (Turn Off Content Deployment Jobs and Turn On Content Deployment Jobs):

Enable
Get-SPContentDeploymentJob | ForEach-Object {$_.IsEnabled = $true; $_.Update()}


Disable
Get-SPContentDeploymentJob | ForEach-Object {$_.IsEnabled = $false; $_.Update()}