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 {
471
471
$null = $PSBoundParameters.Remove (' ResourceName' )
472
472
$null = $PSBoundParameters.Remove (' SubscriptionId' )
473
473
$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" ) }
475
476
if ($null -ne $allAvailableSkus ) {
476
477
$matchingComputeSku = $allAvailableSkus | Where-Object { $_.Name -eq $TargetVMSize }
477
478
if ($null -ne $matchingComputeSku ) {
@@ -747,4 +748,4 @@ public static int hashForArtifact(String artifact)
747
748
748
749
}
749
750
750
- }
751
+ }
Original file line number Diff line number Diff line change 18
18
- Additional information about change #1
19
19
-->
20
20
## Upcoming Release
21
-
21
+ * Fixed bugs in ` New-AzMigrateServerReplication ` caused by deprecation of ` Get-AzVmSize -location `
22
+
22
23
## Version 2.8.0
23
24
* Implemented the Get-AzMigrateServerMigrationStatus cmdlet to retrieve the replication status of servers in Azure Migrate.
24
25
* Fixed bugs in ` New-AzMigrateLocalServerReplication ` that caused HyperVSite or VMwareSite not found.
You can’t perform that action at this time.
0 commit comments