Azure DevOps tools
ado.tools is a PowerShell module designed to simplify and enhance the management of Azure DevOps resources. It provides a collection of functions and utilities to streamline workflows, enforce best practices, and improve productivity when working with Azure DevOps.
Install-Module -Name ado.toolsInstall-Module -Name ado.tools -Scope CurrentUserGet-Command -Module ado.toolsUpdate-Module -Name ado.toolsUpdate-Module -Name ado.tools -ForceThe Invoke-ADOProjectMigration function facilitates the migration of a project from one Azure DevOps organization to another/same. It retrieves the source project details, validates its existence, and prepares for migration to the target organization.
- Ensure that the source and target Azure DevOps organizations and tokens are valid and have the necessary permissions.
- The function handles the migration of:
- Processes
- Work item types
- Fields
- Behaviors
- Picklists
- States
- Rules
- Layouts
- Work items
- Description: The name of the source Azure DevOps organization.
- Type:
string - Mandatory: Yes
- Description: The name of the target Azure DevOps organization.
- Type:
string - Mandatory: Yes
- Description: The name of the project in the source organization to be migrated.
- Type:
string - Mandatory: Yes
- Description: The name of the project in the target organization where the source project will be migrated.
- Type:
string - Mandatory: Yes
- Description: The authentication token for accessing the source Azure DevOps organization.
- Type:
string - Mandatory: Yes
- Description: The authentication token for accessing the target Azure DevOps organization.
- Type:
string - Mandatory: Yes
- Description: The version of the Azure DevOps REST API to use.
- Type:
string - Mandatory: No
- Default:
7.1
Description: Migrates the project sourceProject from the organization sourceOrg to the organization targetOrg.
#Define the required parameters
$sourceOrg = "sourceOrg"
$targetOrg = "targetOrg"
$sourceProjectName = "sourceProject"
$targetProjectName = "targetProject"
$sourceOrgToken = "sourceOrgToken"
$targetOrgToken = "targetOrgToken"
#Call the function
Invoke-ADOProjectMigration -SourceOrganization $sourceOrg `
-TargetOrganization $targetOrg `
-SourceProjectName $sourceProjectName `
-TargetProjectName $targetProjectName `
-SourceOrganizationToken $sourceOrgToken `
-TargetOrganizationToken $targetOrgToken- PowerShell Version: 5.1 or later
This project is licensed under the MIT License. Feel free to use and modify it as needed.
Oleksandr Nikolaiev (@onikolaiev)