-
|
Beta Was this translation helpful? Give feedback.
Answered by
MrHinsh
Mar 16, 2023
Replies: 1 comment 4 replies
-
This is happening because the extensions from the marketplace that are used in each of these do not currently exist. @tomfrenzel created a Script to get a list of all of the extensions from the Source. $sourceOrg = "org1"
$sourcePat = "abc"
$targetOrg = "org2"
$targetPat = "abc"
$sourcePair = "user:$($sourcePat)"
$sourecEncodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($sourcePair))
$sourceBasicAuthValue = "Basic $sourecEncodedCreds"
$sourceHeaders = @{
Authorization = $sourceBasicAuthValue
}
$targetPair = "user:$($targetPat)"
$targetEncodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($targetPair))
$targetBasicAuthValue = "Basic $targetEncodedCreds"
$targetHeaders = @{
Authorization = $targetBasicAuthValue
}
$sourceExtenstions = Invoke-WebRequest -Uri "https://extmgmt.dev.azure.com/$sourceOrg/_apis/extensionmanagement/installedextensions?api-version=7.1-preview.1" -Headers $sourceHeaders | ConvertFrom-Json | Select-Object -ExpandProperty value | Select-Object -ExpandProperty extensionName
$targetExtenstions = Invoke-WebRequest -Uri "https://extmgmt.dev.azure.com/$targetOrg/_apis/extensionmanagement/installedextensions?api-version=7.1-preview.1" -Headers $targetHeaders | ConvertFrom-Json | Select-Object -ExpandProperty value | Select-Object -ExpandProperty extensionName
$diff = $sourceExtenstions | ?{$targetExtenstions -notcontains $_}
Write-Host ($diff -join "`n") |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
MrHinsh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is happening because the extensions from the marketplace that are used in each of these do not currently exist.
@tomfrenzel created a Script to get a list of all of the extensions from the Source.