Skip to content

Instantly share code, notes, and snippets.

@jayveersolanki
Last active March 10, 2025 12:18
Show Gist options
  • Save jayveersolanki/4bede474a1910dd7d534b950005cb650 to your computer and use it in GitHub Desktop.
Save jayveersolanki/4bede474a1910dd7d534b950005cb650 to your computer and use it in GitHub Desktop.
Disable All Jenkins Jobs from UI.
Step 1: Nevigate to *https://<Jenkins_URL>/script* URL
Step 2: Run below script from script console one by one.
I) Jenkins.instance.getAllItems(org.jenkinsci.plugins.workflow.job.WorkflowJob.class).each {i -> i.setDisabled(true); i.save() }
II) Jenkins.instance.getAllItems(hudson.model.AbstractProject.class).each {i -> i.setDisabled(true); i.save()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment