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
Well that just saved me a ton of hassle, thanks (albeit the post on the MS page could do with a touch of formatting!!). Luckily not an important pipeline but one I thought I’d exported during a project move and which may or may not be needed.