From bee8d0c9c7e3981793cee24a4705aa6d37e080d4 Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Thu, 9 Oct 2025 16:24:22 -0700 Subject: [PATCH 1/5] Fix AMH solution tool ServerMigration_DataReplication --- ...zMigrateLocalReplicationInfrastructure.ps1 | 41 +++++++++++++++---- src/Migrate/Migrate/ChangeLog.md | 2 + 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 index f15b60284457..8b8e524517d0 100644 --- a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 @@ -586,32 +586,51 @@ function Initialize-AzMigrateLocalReplicationInfrastructure { # amhStoredStorageAccount exists and in Succeeded state if ($null -ne $amhStoredStorageAccount -and - $amhStoredStorageAccount.ProvisioningState -eq [StorageAccountProvisioningState]::Succeeded) { + $amhStoredStorageAccount.ProvisioningState -eq [StorageAccountProvisioningState]::Succeeded) + { # Use amhStoredStorageAccount and ignore user provided Cache Storage Account Id - if (![string]::IsNullOrEmpty($CacheStorageAccountId) -and $amhStoredStorageAccount.Id -ne $CacheStorageAccountId) { + if (![string]::IsNullOrEmpty($CacheStorageAccountId) -and $amhStoredStorageAccount.Id -ne $CacheStorageAccountId) + { Write-Host "A Cache Storage Account '$($amhStoredStorageAccountName)' has been linked already. The given -CacheStorageAccountId '$($CacheStorageAccountId)' will be ignored." } $cacheStorageAccount = $amhStoredStorageAccount + + # This will fix brownfield issue where AMH solution tool is set incorrectly that causes UX bifracation to go to the wrong experience; + # for new projects that are set correctly from the start, this will essentailly be a no-op. + Az.Migrate.Internal\Set-AzMigrateSolution ` + -MigrateProjectName $ProjectName ` + -Name $amhSolution.Name ` + -ResourceGroupName $ResourceGroupName ` + -DetailExtendedDetail $amhSolution.DetailExtendedDetail.AdditionalProperties ` + -Tool "ServerMigration_DataReplication" ` + -Purpose "Migration" | Out-Null } - elseif ($null -eq $amhStoredStorageAccount -or $null -eq $amhStoredStorageAccount.ProvisioningState) { + elseif ($null -eq $amhStoredStorageAccount -or $null -eq $amhStoredStorageAccount.ProvisioningState) + { # amhStoredStorageAccount is found but in a bad state, so log to ask user to remove - if ($null -ne $amhStoredStorageAccount -and $null -eq $amhStoredStorageAccount.ProvisioningState) { + if ($null -ne $amhStoredStorageAccount -and $null -eq $amhStoredStorageAccount.ProvisioningState) + { Write-Host "A previously linked Cache Storage Account with Id '$($amhStoredStorageAccountId)' is found but in a unusable state. Please remove it manually and re-run this command." } # amhStoredStorageAccount is not found or in a bad state but AMH has a record of it, so remove the record - if ($amhSolution.DetailExtendedDetail.ContainsKey("replicationStorageAccountId")) { + if ($amhSolution.DetailExtendedDetail.ContainsKey("replicationStorageAccountId")) + { $amhSolution.DetailExtendedDetail.Remove("replicationStorageAccountId") | Out-Null $amhSolution.DetailExtendedDetail.Add("replicationStorageAccountId", $null) | Out-Null + Az.Migrate.Internal\Set-AzMigrateSolution ` -MigrateProjectName $ProjectName ` -Name $amhSolution.Name ` -ResourceGroupName $ResourceGroupName ` - -DetailExtendedDetail $amhSolution.DetailExtendedDetail.AdditionalProperties | Out-Null + -DetailExtendedDetail $amhSolution.DetailExtendedDetail.AdditionalProperties ` + -Tool "ServerMigration_DataReplication" ` + -Purpose "Migration"| Out-Null } } - else { + else + { throw "A linked Cache Storage Account with Id '$($amhStoredStorageAccountId)' times out with Provisioning State: '$($amhStoredStorageAccount.ProvisioningState)'. Please re-run this command or contact support if help needed." } @@ -928,13 +947,17 @@ function Initialize-AzMigrateLocalReplicationInfrastructure { } # Update AMH record with chosen Cache Storage Account - if (!$amhSolution.DetailExtendedDetail.ContainsKey("replicationStorageAccountId")) { + if (!$amhSolution.DetailExtendedDetail.ContainsKey("replicationStorageAccountId")) + { $amhSolution.DetailExtendedDetail.Add("replicationStorageAccountId", $cacheStorageAccount.Id) + Az.Migrate.Internal\Set-AzMigrateSolution ` -MigrateProjectName $ProjectName ` -Name $amhSolution.Name ` -ResourceGroupName $ResourceGroupName ` - -DetailExtendedDetail $amhSolution.DetailExtendedDetail.AdditionalProperties | Out-Null + -DetailExtendedDetail $amhSolution.DetailExtendedDetail.AdditionalProperties ` + -Tool "ServerMigration_DataReplication" ` + -Purpose "Migration"| Out-Null } Write-Host "*Selected Cache Storage Account: '$($cacheStorageAccount.StorageAccountName)' in Resource Group '$($ResourceGroupName)' at Location '$($cacheStorageAccount.Location)' for Migrate Project '$($migrateProject.Name)'" diff --git a/src/Migrate/Migrate/ChangeLog.md b/src/Migrate/Migrate/ChangeLog.md index 3775c80fdb94..b5a8e99fc601 100644 --- a/src/Migrate/Migrate/ChangeLog.md +++ b/src/Migrate/Migrate/ChangeLog.md @@ -25,6 +25,8 @@ * Fixed bugs in `Set-AzMigrateLocalServerReplication`: Added ARM id validation for input parameters * Fixed bugs in `Get-AzMigrateLocalServerReplication`: Added ARM id validation for input parameters * Enhanced Get-AzMigrateServerMigrationStatus to add support for the -Expedite parameter. +* Fixed bugs in `Initialize-AzMigrateLocalReplicationInfrastructure` + - Correct AMH solution tool name of "ServerMigration_DataReplication" is now being passed in to address replication count missing and UX bifracation experience issues in Azure Migrate on Azure portal. ## Version 2.9.0 * Added `-OsType` as an optional parameter to command `Set-AzMigrateLocalServerReplication` to allow user-specified OS type. From e39aefb4571bb42e8177833e67e88e00e6fcbfd7 Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Thu, 9 Oct 2025 16:27:44 -0700 Subject: [PATCH 2/5] Fix typo --- ...Initialize-AzMigrateLocalReplicationInfrastructure.ps1 | 8 ++++---- src/Migrate/Migrate/ChangeLog.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 index 8b8e524517d0..729bde5377aa 100644 --- a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 @@ -596,8 +596,8 @@ function Initialize-AzMigrateLocalReplicationInfrastructure { $cacheStorageAccount = $amhStoredStorageAccount - # This will fix brownfield issue where AMH solution tool is set incorrectly that causes UX bifracation to go to the wrong experience; - # for new projects that are set correctly from the start, this will essentailly be a no-op. + # This will fix brownfield issue where AMH solution tool is set incorrectly that causes UX bifurcation to go to the wrong experience; + # for new projects that are set correctly from the start, this will essentially be a no-op. Az.Migrate.Internal\Set-AzMigrateSolution ` -MigrateProjectName $ProjectName ` -Name $amhSolution.Name ` @@ -626,7 +626,7 @@ function Initialize-AzMigrateLocalReplicationInfrastructure { -ResourceGroupName $ResourceGroupName ` -DetailExtendedDetail $amhSolution.DetailExtendedDetail.AdditionalProperties ` -Tool "ServerMigration_DataReplication" ` - -Purpose "Migration"| Out-Null + -Purpose "Migration" | Out-Null } } else @@ -957,7 +957,7 @@ function Initialize-AzMigrateLocalReplicationInfrastructure { -ResourceGroupName $ResourceGroupName ` -DetailExtendedDetail $amhSolution.DetailExtendedDetail.AdditionalProperties ` -Tool "ServerMigration_DataReplication" ` - -Purpose "Migration"| Out-Null + -Purpose "Migration" | Out-Null } Write-Host "*Selected Cache Storage Account: '$($cacheStorageAccount.StorageAccountName)' in Resource Group '$($ResourceGroupName)' at Location '$($cacheStorageAccount.Location)' for Migrate Project '$($migrateProject.Name)'" diff --git a/src/Migrate/Migrate/ChangeLog.md b/src/Migrate/Migrate/ChangeLog.md index b5a8e99fc601..e9d92e637c86 100644 --- a/src/Migrate/Migrate/ChangeLog.md +++ b/src/Migrate/Migrate/ChangeLog.md @@ -26,7 +26,7 @@ * Fixed bugs in `Get-AzMigrateLocalServerReplication`: Added ARM id validation for input parameters * Enhanced Get-AzMigrateServerMigrationStatus to add support for the -Expedite parameter. * Fixed bugs in `Initialize-AzMigrateLocalReplicationInfrastructure` - - Correct AMH solution tool name of "ServerMigration_DataReplication" is now being passed in to address replication count missing and UX bifracation experience issues in Azure Migrate on Azure portal. + - Correct AMH solution tool name of "ServerMigration_DataReplication" is now being passed in to address replication count missing and UX experience load issues in Azure Migrate on Azure portal. ## Version 2.9.0 * Added `-OsType` as an optional parameter to command `Set-AzMigrateLocalServerReplication` to allow user-specified OS type. From e4f3e7ea80d79c483c24d663431ec5049369f920 Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Fri, 10 Oct 2025 00:02:59 -0700 Subject: [PATCH 3/5] Address Join-Path with older PS version --- .../custom/Get-AzMigrateLocalServerReplication.ps1 | 4 ++-- .../Initialize-AzMigrateLocalReplicationInfrastructure.ps1 | 4 ++-- .../custom/Initialize-AzMigrateReplicationInfrastructure.ps1 | 2 +- .../custom/New-AzMigrateLocalServerReplication.ps1 | 4 ++-- .../custom/Set-AzMigrateLocalServerReplication.ps1 | 4 ++-- .../custom/Start-AzMigrateLocalServerMigration.ps1 | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 index 723171f9d231..ccf3b66ebb2d 100644 --- a/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 @@ -132,9 +132,9 @@ function Get-AzMigrateLocalServerReplication { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonSettings.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonHelper.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' Import-Module $helperPath $hasTargetObjectId = $PSBoundParameters.ContainsKey('TargetObjectID') diff --git a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 index 729bde5377aa..1513a79fc4f5 100644 --- a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 @@ -120,9 +120,9 @@ function Initialize-AzMigrateLocalReplicationInfrastructure { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonSettings.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonHelper.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' Import-Module $helperPath CheckResourcesModuleDependency diff --git a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 index ac960d7120c0..8ac93e32f36c 100644 --- a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 @@ -134,7 +134,7 @@ function Initialize-AzMigrateReplicationInfrastructure { Import-Module Az.Resources Import-Module Az.Storage Import-Module Az.RecoveryServices - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonSettings.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' Import-Module $helperPath # Validate user specified target region diff --git a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 index d641c7ddf999..d7066cd32b08 100644 --- a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 @@ -169,9 +169,9 @@ function New-AzMigrateLocalServerReplication { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonSettings.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonHelper.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' Import-Module $helperPath CheckResourceGraphModuleDependency diff --git a/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 index f7bbd885103d..419c52de8ac3 100644 --- a/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 @@ -128,9 +128,9 @@ function Set-AzMigrateLocalServerReplication { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonSettings.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonHelper.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' Import-Module $helperPath CheckResourcesModuleDependency diff --git a/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 b/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 index 73ece63eadc8..4866cb74ee4d 100644 --- a/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 @@ -100,9 +100,9 @@ function Start-AzMigrateLocalServerMigration { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonSettings.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper' 'AzLocalCommonHelper.ps1' + $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' Import-Module $helperPath CheckResourceGraphModuleDependency From a79dbf15e6b28cdac06a4c4a7b8eb538d758c33e Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Wed, 15 Oct 2025 10:07:31 -0700 Subject: [PATCH 4/5] Update helper path for max compatibility --- .../custom/Get-AzMigrateLocalServerReplication.ps1 | 4 ++-- .../Initialize-AzMigrateLocalReplicationInfrastructure.ps1 | 4 ++-- .../custom/Initialize-AzMigrateReplicationInfrastructure.ps1 | 2 +- .../custom/New-AzMigrateLocalServerReplication.ps1 | 4 ++-- .../custom/Set-AzMigrateLocalServerReplication.ps1 | 4 ++-- .../custom/Start-AzMigrateLocalServerMigration.ps1 | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 index ccf3b66ebb2d..a57159fa285e 100644 --- a/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 @@ -132,9 +132,9 @@ function Get-AzMigrateLocalServerReplication { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonSettings.ps1") Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonHelper.ps1") Import-Module $helperPath $hasTargetObjectId = $PSBoundParameters.ContainsKey('TargetObjectID') diff --git a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 index 1513a79fc4f5..1a8af557cbe6 100644 --- a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 @@ -120,9 +120,9 @@ function Initialize-AzMigrateLocalReplicationInfrastructure { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonSettings.ps1") Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonHelper.ps1") Import-Module $helperPath CheckResourcesModuleDependency diff --git a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 index 8ac93e32f36c..866381deed17 100644 --- a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 @@ -134,7 +134,7 @@ function Initialize-AzMigrateReplicationInfrastructure { Import-Module Az.Resources Import-Module Az.Storage Import-Module Az.RecoveryServices - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonSettings.ps1") Import-Module $helperPath # Validate user specified target region diff --git a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 index d7066cd32b08..749e1ae1ee70 100644 --- a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 @@ -169,9 +169,9 @@ function New-AzMigrateLocalServerReplication { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonSettings.ps1") Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonHelper.ps1") Import-Module $helperPath CheckResourceGraphModuleDependency diff --git a/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 index 419c52de8ac3..51a73a8765d5 100644 --- a/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 @@ -128,9 +128,9 @@ function Set-AzMigrateLocalServerReplication { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonSettings.ps1") Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonHelper.ps1") Import-Module $helperPath CheckResourcesModuleDependency diff --git a/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 b/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 index 4866cb74ee4d..89af2cc83c03 100644 --- a/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 @@ -100,9 +100,9 @@ function Start-AzMigrateLocalServerMigration { ) process { - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonSettings.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonSettings.ps1") Import-Module $helperPath - $helperPath = Join-Path $PSScriptRoot 'Helper\AzLocalCommonHelper.ps1' + $helperPath = [System.IO.Path]::Combine($PSScriptRoot, "Helper", "AzLocalCommonHelper.ps1") Import-Module $helperPath CheckResourceGraphModuleDependency From bd2f6d51e52adc38b71044eb9574a9264b66a9a2 Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Wed, 15 Oct 2025 10:26:06 -0700 Subject: [PATCH 5/5] Address comments to prevent bad merge --- src/Migrate/Migrate/ChangeLog.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Migrate/Migrate/ChangeLog.md b/src/Migrate/Migrate/ChangeLog.md index e9d92e637c86..add583971bf4 100644 --- a/src/Migrate/Migrate/ChangeLog.md +++ b/src/Migrate/Migrate/ChangeLog.md @@ -18,6 +18,15 @@ - Additional information about change #1 --> ## Upcoming Release +* Fixed bugs in `Initialize-AzMigrateLocalReplicationInfrastructure` + - Correct AMH solution tool name of "ServerMigration_DataReplication" is now being passed in to address replication count missing and UX experience load issues in Azure Migrate on Azure portal. +* Address Join-Path compatibility issue in older version of PowerShell environment such as PowerShell 5.1 in the following commands + - `Initialize-AzMigrateLocalReplicationInfrastructure` + - `Initialize-AzMigrateReplicationInfrastructure` + - `New-AzMigrateLocalServerReplication` + - `Get-AzMigrateLocalServerReplication` + - `Set-AzMigrateLocalServerReplication` + - `Start-AzMigrateLocalServerMigration` ## Version 2.10.0 * Fixed bugs in `New-AzMigrateLocalDiskMappingObject`: Only validate for non-512 physical sector size of VHD when `-PhysicalSectorSize` parameter is given @@ -25,8 +34,6 @@ * Fixed bugs in `Set-AzMigrateLocalServerReplication`: Added ARM id validation for input parameters * Fixed bugs in `Get-AzMigrateLocalServerReplication`: Added ARM id validation for input parameters * Enhanced Get-AzMigrateServerMigrationStatus to add support for the -Expedite parameter. -* Fixed bugs in `Initialize-AzMigrateLocalReplicationInfrastructure` - - Correct AMH solution tool name of "ServerMigration_DataReplication" is now being passed in to address replication count missing and UX experience load issues in Azure Migrate on Azure portal. ## Version 2.9.0 * Added `-OsType` as an optional parameter to command `Set-AzMigrateLocalServerReplication` to allow user-specified OS type.