Azure DevOps – Restore deleted pipelines

If you have deleted a release definition, either intentionally or by mistake, currently there is no way to restore it through the UI. However, there is a way to recover it using a simple PowerShell script. The details for the script can be found here.

A couple of points to note about running the script.

  • The script will only work within 4 weeks of the definition being deleted.
  • You will need to create a Personal Access Token (PAT) within your DevOps account. Details for creating your PAT are available here.
  • You do not need to encode the $accountName, $projectName and $definitionNameToRecover variables. Values containing spaces will work.
  • The script will recover the release definition but not the release history
Advertisements