File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -471,7 +471,8 @@ function New-AzMigrateServerReplication {
471471 $null = $PSBoundParameters.Remove (' ResourceName' )
472472 $null = $PSBoundParameters.Remove (' SubscriptionId' )
473473 $null = $PSBoundParameters.Add (' Location' , $TargetRegion )
474- $allAvailableSkus = Get-AzVMSize @PSBoundParameters - ErrorVariable notPresent - ErrorAction SilentlyContinue
474+ # Get-AzVMSku -Location is deprecated, replicate using Get-AzComputeResourceSKU and a where clause
475+ $allAvailableSkus = Get-AzComputeResourceSKU @PSBoundParameters | Where-Object { $_.ResourceType.Contains (" virtualMachines" ) }
475476 if ($null -ne $allAvailableSkus ) {
476477 $matchingComputeSku = $allAvailableSkus | Where-Object { $_.Name -eq $TargetVMSize }
477478 if ($null -ne $matchingComputeSku ) {
@@ -747,4 +748,4 @@ public static int hashForArtifact(String artifact)
747748
748749 }
749750
750- }
751+ }
Original file line number Diff line number Diff line change 1818 - Additional information about change #1
1919-->
2020## Upcoming Release
21-
21+ * Fixed bugs in ` New-AzMigrateServerReplication ` caused by deprecation of ` Get-AzVmSize -location `
22+
2223## Version 2.8.0
2324* Implemented the Get-AzMigrateServerMigrationStatus cmdlet to retrieve the replication status of servers in Azure Migrate.
2425* Fixed bugs in ` New-AzMigrateLocalServerReplication ` that caused HyperVSite or VMwareSite not found.
You can’t perform that action at this time.
0 commit comments