diff --git a/src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs b/src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs index 51c64c08eb86..cfd29a74ce34 100644 --- a/src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs +++ b/src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs @@ -24,3 +24,5 @@ [assembly: System.Reflection.AssemblyVersionAttribute("2.11.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] + + diff --git a/src/Migrate/Migrate.Autorest/README.md b/src/Migrate/Migrate.Autorest/README.md index a8a3acee77e2..71dc8d3c6557 100644 --- a/src/Migrate/Migrate.Autorest/README.md +++ b/src/Migrate/Migrate.Autorest/README.md @@ -52,7 +52,7 @@ input-file: - $(repo)/specification/migrate/resource-manager/Microsoft.OffAzure/stable/2020-01-01/migrate.json - $(repo)/specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json - $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json - - $(repo)/specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json + - /azure-rest-api-specs-pr/specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/DataReplication/stable/2026-02-01/recoveryservicesdatareplication.json module-version: 3.0.14 title: Migrate diff --git a/src/Migrate/Migrate.Autorest/UX/Microsoft.DataReplication/replicationFabrics.json b/src/Migrate/Migrate.Autorest/UX/Microsoft.DataReplication/replicationFabrics.json index 9a71642b5afb..df445feb825d 100644 --- a/src/Migrate/Migrate.Autorest/UX/Microsoft.DataReplication/replicationFabrics.json +++ b/src/Migrate/Migrate.Autorest/UX/Microsoft.DataReplication/replicationFabrics.json @@ -1,6 +1,6 @@ { "resourceType": "replicationFabrics", - "apiVersion": "2024-09-01", + "apiVersion": "2026-02-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.migrate" }, diff --git a/src/Migrate/Migrate.Autorest/custom/Az.Migrate.custom.psm1 b/src/Migrate/Migrate.Autorest/custom/Az.Migrate.custom.psm1 index 414362f01faf..a8fc67b1e913 100644 --- a/src/Migrate/Migrate.Autorest/custom/Az.Migrate.custom.psm1 +++ b/src/Migrate/Migrate.Autorest/custom/Az.Migrate.custom.psm1 @@ -1,9 +1,9 @@ # region Generated # Load the private module dll - $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Migrate.private.dll') + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.Migrate.private.dll') # Load the internal module - $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Migrate.internal.psm1' + $internalModulePath = Join-Path $PSScriptRoot '../internal/Az.Migrate.internal.psm1' if(Test-Path $internalModulePath) { $null = Import-Module -Name $internalModulePath } diff --git a/src/Migrate/Migrate.Autorest/custom/AzLocalDiskInput.cs b/src/Migrate/Migrate.Autorest/custom/AzLocalDiskInput.cs index aa4f9e8185df..8d8b93ab2da7 100644 --- a/src/Migrate/Migrate.Autorest/custom/AzLocalDiskInput.cs +++ b/src/Migrate/Migrate.Autorest/custom/AzLocalDiskInput.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. using System; -namespace Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201 { public class AzLocalDiskInput { diff --git a/src/Migrate/Migrate.Autorest/custom/AzLocalNicInput.cs b/src/Migrate/Migrate.Autorest/custom/AzLocalNicInput.cs index da4d43771c2a..d96a4055df56 100644 --- a/src/Migrate/Migrate.Autorest/custom/AzLocalNicInput.cs +++ b/src/Migrate/Migrate.Autorest/custom/AzLocalNicInput.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -namespace Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201 { public class AzLocalNicInput { diff --git a/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalJob.ps1 b/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalJob.ps1 index cf03f407c79c..e345b40128a6 100644 --- a/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalJob.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalJob.ps1 @@ -28,7 +28,7 @@ function Get-AzMigrateLocalJob { * See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *`n ***************************************************************************************************")] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel])] [CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)] param( [Parameter(ParameterSetName = 'GetById', Mandatory)] diff --git a/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 index aa6a0610056e..6e4b59768cfa 100644 --- a/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 @@ -28,7 +28,7 @@ function Get-AzMigrateLocalServerReplication { * See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *`n ***************************************************************************************************")] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IProtectedItemModel])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IProtectedItemModel])] [CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)] param( [Parameter(ParameterSetName = 'GetByItemID', Mandatory)] diff --git a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 index 9eedb0cde11b..ac49b4076396 100644 --- a/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 @@ -469,12 +469,12 @@ function Initialize-AzMigrateLocalReplicationInfrastructure { } # Setup Policy deployment parameters - $policyProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.PolicyModelProperties]::new() + $policyProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.PolicyModelProperties]::new() if ($instanceType -eq $AzLocalInstanceTypes.HyperVToAzLocal) { - $policyCustomProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.HyperVToAzStackHcipolicyModelCustomProperties]::new() + $policyCustomProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.HyperVToAzStackHcipolicyModelCustomProperties]::new() } elseif ($instanceType -eq $AzLocalInstanceTypes.VMwareToAzLocal) { - $policyCustomProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.VMwareToAzStackHcipolicyModelCustomProperties]::new() + $policyCustomProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.VMwareToAzStackHcipolicyModelCustomProperties]::new() } else { throw "Instance type '$($instanceType)' is not supported. Currently, for AzLocal scenario, only HyperV and VMware as the source is supported." @@ -1133,15 +1133,15 @@ function Initialize-AzMigrateLocalReplicationInfrastructure { } # Setup Replication Extension deployment parameters - $replicationExtensionProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.ReplicationExtensionModelProperties]::new() + $replicationExtensionProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.ReplicationExtensionModelProperties]::new() if ($instanceType -eq $AzLocalInstanceTypes.HyperVToAzLocal) { - $replicationExtensionCustomProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.HyperVToAzStackHcireplicationExtensionModelCustomProperties]::new() + $replicationExtensionCustomProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.HyperVToAzStackHcireplicationExtensionModelCustomProperties]::new() $replicationExtensionCustomProperties.HyperVFabricArmId = $params.SourceFabricArmId } elseif ($instanceType -eq $AzLocalInstanceTypes.VMwareToAzLocal) { - $replicationExtensionCustomProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.VMwareToAzStackHcireplicationExtensionModelCustomProperties]::new() + $replicationExtensionCustomProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.VMwareToAzStackHcireplicationExtensionModelCustomProperties]::new() $replicationExtensionCustomProperties.VMwareFabricArmId = $params.SourceFabricArmId } else { diff --git a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalDiskMappingObject.ps1 b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalDiskMappingObject.ps1 index 85b13f624613..cde9b42aa985 100644 --- a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalDiskMappingObject.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalDiskMappingObject.ps1 @@ -23,7 +23,7 @@ https://learn.microsoft.com/powershell/module/az.migrate/new-azmigratelocaldiskm #> function New-AzMigrateLocalDiskMappingObject { [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalDiskInput])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalDiskInput])] [CmdletBinding(PositionalBinding = $false)] param( [Parameter(Mandatory)] @@ -80,7 +80,7 @@ function New-AzMigrateLocalDiskMappingObject { throw "PhysicalSectorSize must be 512 for VHD format but $PhysicalSectorSize is given." } - $DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalDiskInput]::new( + $DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalDiskInput]::new( $DiskID, $isDynamicDisk, $Size, diff --git a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalNicMappingObject.ps1 b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalNicMappingObject.ps1 index edb0f505e1d6..ac21e713dbc3 100644 --- a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalNicMappingObject.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalNicMappingObject.ps1 @@ -23,7 +23,7 @@ https://learn.microsoft.com/powershell/module/az.migrate/new-azmigratelocalnicma #> function New-AzMigrateLocalNicMappingObject { [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput])] [CmdletBinding(PositionalBinding = $false)] param( [Parameter(Mandatory)] @@ -70,7 +70,7 @@ function New-AzMigrateLocalNicMappingObject { $selectionTypeForFailover = $VMNicSelection.NotSelected } - $NicObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput]::new( + $NicObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput]::new( $NicID, $TargetVirtualSwitchId, $TargetTestVirtualSwitchId, diff --git a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 index 1269524c6a1b..c85b9486eae2 100644 --- a/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 @@ -23,7 +23,7 @@ https://learn.microsoft.com/powershell/module/az.migrate/new-azmigratelocalserve #> function New-AzMigrateLocalServerReplication { [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel])] [CmdletBinding(DefaultParameterSetName = 'ByIdDefaultUser', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'ByIdDefaultUser', Mandatory)] @@ -65,6 +65,14 @@ function New-AzMigrateLocalServerReplication { # Specifies if RAM is dynamic or not. ${IsDynamicMemoryEnabled}, + [Parameter()] + [ValidateSet("true" , "false")] + [ArgumentCompleter( { "true" , "false" })] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies whether the VM should be migrated as an Arc VM. + ${MigrateAsArcVM}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.Int64] @@ -73,13 +81,13 @@ function New-AzMigrateLocalServerReplication { [Parameter(ParameterSetName = 'ByIdPowerUser', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalDiskInput[]] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalDiskInput[]] # Specifies the disks on the source server to be included for replication. ${DiskToInclude}, [Parameter(ParameterSetName = 'ByIdPowerUser', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput[]] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput[]] # Specifies the NICs on the source server to be included for replication. ${NicToInclude}, @@ -185,6 +193,10 @@ function New-AzMigrateLocalServerReplication { if ($HasIsDynamicMemoryEnabled) { $isDynamicRamEnabled = [System.Convert]::ToBoolean($IsDynamicMemoryEnabled) } + $HasMigrateAsArcVM = $PSBoundParameters.ContainsKey('MigrateAsArcVM') + if ($HasMigrateAsArcVM) { + $migrateAsArcVMEnabled = [System.Convert]::ToBoolean($MigrateAsArcVM) + } $HasTargetVMRam = $PSBoundParameters.ContainsKey('TargetVMRam') $HasTargetVirtualSwitchId = $PSBoundParameters.ContainsKey('TargetVirtualSwitchId') $HasTargetTestVirtualSwitchId = $PSBoundParameters.ContainsKey('TargetTestVirtualSwitchId') @@ -198,6 +210,7 @@ function New-AzMigrateLocalServerReplication { $null = $PSBoundParameters.Remove('TargetVirtualSwitchId') $null = $PSBoundParameters.Remove('TargetTestVirtualSwitchId') $null = $PSBoundParameters.Remove('IsDynamicMemoryEnabled') + $null = $PSBoundParameters.Remove('MigrateAsArcVM') $null = $PSBoundParameters.Remove('TargetVMRam') $null = $PSBoundParameters.Remove('DiskToInclude') $null = $PSBoundParameters.Remove('NicToInclude') @@ -633,16 +646,16 @@ function New-AzMigrateLocalServerReplication { } # Construct create protected item request object - $protectedItemProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.ProtectedItemModelProperties]::new() + $protectedItemProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.ProtectedItemModelProperties]::new() $protectedItemProperties.PolicyName = $policyName $protectedItemProperties.ReplicationExtensionName = $replicationExtensionName if ($SiteType -eq $SiteTypes.HyperVSites) { - $customProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.HyperVToAzStackHCIProtectedItemModelCustomProperties]::new() + $customProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.HyperVToAzStackHciprotectedItemModelCustomProperties]::new() $isSourceDynamicMemoryEnabled = $machine.IsDynamicMemoryEnabled } elseif ($SiteType -eq $SiteTypes.VMwareSites) { - $customProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.VMwareToAzStackHCIProtectedItemModelCustomProperties]::new() + $customProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.VMwareToAzStackHciprotectedItemModelCustomProperties]::new() $isSourceDynamicMemoryEnabled = $false } @@ -658,6 +671,9 @@ function New-AzMigrateLocalServerReplication { $customProperties.TargetResourceGroupId = $TargetResourceGroupId $customProperties.TargetVMName = $TargetVMName $customProperties.IsDynamicRam = if ($HasIsDynamicMemoryEnabled) { $isDynamicRamEnabled } else { $isSourceDynamicMemoryEnabled } + if ($HasMigrateAsArcVM) { + $customProperties.MigrateAsArcVM = $migrateAsArcVMEnabled + } # Determine target VM Hyper-V Generation if ($SiteType -eq $SiteTypes.HyperVSites) { @@ -710,7 +726,7 @@ function New-AzMigrateLocalServerReplication { } # Construct default dynamic memory config - $memoryConfig = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.ProtectedItemDynamicMemoryConfig]::new() + $memoryConfig = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.ProtectedItemDynamicMemoryConfig]::new() $memoryConfig.MinimumMemoryInMegaByte = [System.Math]::Min($customProperties.TargetMemoryInMegaByte, $RAMConfig.DefaultMinDynamicMemoryInMB) $memoryConfig.MaximumMemoryInMegaByte = [System.Math]::Max($customProperties.TargetMemoryInMegaByte, $RAMConfig.DefaultMaxDynamicMemoryInMB) $memoryConfig.TargetMemoryBufferPercentage = $RAMConfig.DefaultTargetMemoryBufferPercentage @@ -835,12 +851,12 @@ function New-AzMigrateLocalServerReplication { } if ($SiteType -eq $SiteTypes.HyperVSites) { - $customProperties.DisksToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.HyperVToAzStackHCIDiskInput[]]$disks - $customProperties.NicsToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.HyperVToAzStackHCINicInput[]]$nics + $customProperties.DisksToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.HyperVToAzStackHcidiskInput[]]$disks + $customProperties.NicsToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.HyperVToAzStackHcinicInput[]]$nics } elseif ($SiteType -eq $SiteTypes.VMwareSites) { - $customProperties.DisksToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.VMwareToAzStackHCIDiskInput[]]$disks - $customProperties.NicsToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.VMwareToAzStackHCINicInput[]]$nics + $customProperties.DisksToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.VMwareToAzStackHcidiskInput[]]$disks + $customProperties.NicsToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.VMwareToAzStackHcinicInput[]]$nics } $protectedItemProperties.CustomProperty = $customProperties diff --git a/src/Migrate/Migrate.Autorest/custom/README.md b/src/Migrate/Migrate.Autorest/custom/README.md index 67ca1cd0e5cd..a268d35afb1d 100644 --- a/src/Migrate/Migrate.Autorest/custom/README.md +++ b/src/Migrate/Migrate.Autorest/custom/README.md @@ -1,5 +1,5 @@ # Custom -This directory contains custom implementation for non-generated cmdlets for the `Az.Migrate` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Migrate.custom.psm1`. This file should not be modified. +This directory contains custom implementation for non-generated cmdlets for the `Az.Migrate` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.Migrate.custom.psm1`. This file should not be modified. ## Info - Modifiable: yes @@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle For script cmdlets, these are loaded via the `Az.Migrate.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. ## Purpose -This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder. ## Usage -The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: - Break - DefaultProfile - HttpPipelineAppend @@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes: - `Microsoft.Azure.PowerShell.Cmdlets.Migrate.DoNotExportAttribute` - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Migrate`. - `Microsoft.Azure.PowerShell.Cmdlets.Migrate.InternalExportAttribute` - - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Migrate`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder. + - Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Migrate`. For more information, see [README.md](../internal/README.md) in the `../internal` folder. - `Microsoft.Azure.PowerShell.Cmdlets.Migrate.ProfileAttribute` - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/Migrate/Migrate.Autorest/custom/Remove-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/Remove-AzMigrateLocalServerReplication.ps1 index 02e5bbf95d7d..323a047e3763 100644 --- a/src/Migrate/Migrate.Autorest/custom/Remove-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Remove-AzMigrateLocalServerReplication.ps1 @@ -23,7 +23,7 @@ https://learn.microsoft.com/powershell/module/az.migrate/remove-azmigratelocalse #> function Remove-AzMigrateLocalServerReplication { [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel])] [CmdletBinding(DefaultParameterSetName = 'ByID', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName = 'ByID', Mandatory)] diff --git a/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 b/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 index 92143aaa9b7f..7d8c337e0f48 100644 --- a/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 @@ -23,7 +23,7 @@ https://learn.microsoft.com/powershell/module/az.migrate/set-azmigratelocalserve #> function Set-AzMigrateLocalServerReplication { [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel])] [CmdletBinding(DefaultParameterSetName = 'ById', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -48,7 +48,7 @@ function Set-AzMigrateLocalServerReplication { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.ProtectedItemDynamicMemoryConfig] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.ProtectedItemDynamicMemoryConfig] # Specifies the dynamic memory configuration of RAM. ${DynamicMemoryConfig}, @@ -60,7 +60,7 @@ function Set-AzMigrateLocalServerReplication { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput[]] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput[]] # Specifies the nics on the source server to be included for replication. ${NicToInclude}, @@ -201,11 +201,11 @@ function Set-AzMigrateLocalServerReplication { } if ($SiteType -eq $SiteTypes.HyperVSites) { - $customPropertiesUpdate = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.HyperVToAzStackHCIProtectedItemModelCustomPropertiesUpdate]::new() + $customPropertiesUpdate = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.HyperVToAzStackHciprotectedItemModelCustomPropertiesUpdate]::new() $customPropertiesUpdate.InstanceType = $AzLocalInstanceTypes.HyperVToAzLocal } elseif ($SiteType -eq $SiteTypes.VMwareSites) { - $customPropertiesUpdate = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.VMwareToAzStackHCIProtectedItemModelCustomPropertiesUpdate]::new() + $customPropertiesUpdate = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.VMwareToAzStackHciprotectedItemModelCustomPropertiesUpdate]::new() $customPropertiesUpdate.InstanceType = $AzLocalInstanceTypes.VMwareToAzLocal } @@ -248,6 +248,7 @@ function Set-AzMigrateLocalServerReplication { $customPropertiesUpdate.IsDynamicRam = $customProperties.IsDynamicRam } + # Dynamic memory is enabled - set provided configuration if ($customPropertiesUpdate.IsDynamicRam -and $HasDynamicMemoryConfig) { if ($targetMemory -lt $DynamicMemoryConfig.MinimumMemoryInMegaByte) { @@ -269,7 +270,7 @@ function Set-AzMigrateLocalServerReplication { # Dynamic memory is enabled - set default configuration if ($customPropertiesUpdate.IsDynamicRam -and !$HasDynamicMemoryConfig) { if ($null -eq $customProperties.DynamicMemoryConfig) { - $memoryConfig = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.ProtectedItemDynamicMemoryConfig]::new() + $memoryConfig = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.ProtectedItemDynamicMemoryConfig]::new() $memoryConfig.MinimumMemoryInMegaByte = [System.Math]::Min($targetMemory, $RAMConfig.DefaultMinDynamicMemoryInMB) $memoryConfig.MaximumMemoryInMegaByte = [System.Math]::Max($targetMemory, $RAMConfig.DefaultMaxDynamicMemoryInMB) $memoryConfig.TargetMemoryBufferPercentage = $RAMConfig.DefaultTargetMemoryBufferPercentage @@ -329,10 +330,10 @@ function Set-AzMigrateLocalServerReplication { } if ($SiteType -eq $SiteTypes.HyperVSites) { - $customPropertiesUpdate.NicsToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.HyperVToAzStackHCINicInput[]]$nics + $customPropertiesUpdate.NicsToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.HyperVToAzStackHcinicInput[]]$nics } elseif ($SiteType -eq $SiteTypes.VMwareSites) { - $customPropertiesUpdate.NicsToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.VMwareToAzStackHCINicInput[]]$nics + $customPropertiesUpdate.NicsToInclude = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.VMwareToAzStackHcinicInput[]]$nics } } @@ -341,7 +342,7 @@ function Set-AzMigrateLocalServerReplication { $customPropertiesUpdate.OsType = $OsType } - $protectedItemPropertiesUpdate = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.ProtectedItemModelPropertiesUpdate]::new() + $protectedItemPropertiesUpdate = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.ProtectedItemModelPropertiesUpdate]::new() $protectedItemPropertiesUpdate.CustomProperty = $customPropertiesUpdate # Remove common ErrorVariable and ErrorAction for get behaviors diff --git a/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 b/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 index 89af2cc83c03..72c61b1b58bd 100644 --- a/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 +++ b/src/Migrate/Migrate.Autorest/custom/Start-AzMigrateLocalServerMigration.ps1 @@ -23,7 +23,7 @@ https://learn.microsoft.com/powershell/module/az.migrate/start-azmigratelocalser #> function Start-AzMigrateLocalServerMigration { [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel])] [CmdletBinding(DefaultParameterSetName = 'ByID', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName = 'ByID', Mandatory)] @@ -153,13 +153,13 @@ function Start-AzMigrateLocalServerMigration { $instanceType = $protectedItem.Property.CustomProperty.InstanceType # Setup PlannedFailover deployment parameters - $properties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.PlannedFailoverModelProperties]::new() + $properties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.PlannedFailoverModelProperties]::new() if ($instanceType -eq $AzLocalInstanceTypes.HyperVToAzLocal) { - $customProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.HyperVToAzStackHciPlannedFailoverModelCustomProperties]::new() + $customProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.HyperVToAzStackHciPlannedFailoverModelCustomProperties]::new() } elseif ($instanceType -eq $AzLocalInstanceTypes.VMwareToAzLocal) { - $customProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.VMwareToAzStackHciPlannedFailoverModelCustomProperties]::new() + $customProperties = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.VMwareToAzStackHciPlannedFailoverModelCustomProperties]::new() } else { throw "Currently, for AzLocal scenario, only HyperV and VMware as the source is supported." diff --git a/src/Migrate/Migrate.Autorest/docs/Az.Migrate.md b/src/Migrate/Migrate.Autorest/docs/Az.Migrate.md index 9acf8c021552..c3f350c83060 100644 --- a/src/Migrate/Migrate.Autorest/docs/Az.Migrate.md +++ b/src/Migrate/Migrate.Autorest/docs/Az.Migrate.md @@ -1,6 +1,6 @@ --- Module Name: Az.Migrate -Module Guid: 1e28f0b4-1cb3-4e57-ae54-b783789ddc1f +Module Guid: 1902a337-0442-4923-8323-7b11f6936631 Download Help Link: https://learn.microsoft.com/powershell/module/az.migrate Help Version: 1.0.0.0 Locale: en-US diff --git a/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalJob.md b/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalJob.md index fc4f9b8c0ed2..f2db2e87428c 100644 --- a/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalJob.md +++ b/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalJob.md @@ -448,7 +448,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES diff --git a/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalReplicationFabric.md b/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalReplicationFabric.md index 3f8a2170a51b..12bc5bd24a57 100644 --- a/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalReplicationFabric.md +++ b/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalReplicationFabric.md @@ -259,7 +259,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IFabricModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IFabricModel ## NOTES diff --git a/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalServerReplication.md b/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalServerReplication.md index 88ee8137805e..a1f6c37f9f74 100644 --- a/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalServerReplication.md +++ b/src/Migrate/Migrate.Autorest/docs/Get-AzMigrateLocalServerReplication.md @@ -288,7 +288,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IProtectedItemModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IProtectedItemModel ## NOTES diff --git a/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalDiskMappingObject.md b/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalDiskMappingObject.md index 47164f1d6be3..670e8da26f12 100644 --- a/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalDiskMappingObject.md +++ b/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalDiskMappingObject.md @@ -138,7 +138,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalDiskInput +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalDiskInput ## NOTES diff --git a/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalNicMappingObject.md b/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalNicMappingObject.md index cc24799c603e..f912bbd8844a 100644 --- a/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalNicMappingObject.md +++ b/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalNicMappingObject.md @@ -106,7 +106,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput ## NOTES diff --git a/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalServerReplication.md b/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalServerReplication.md index 80d24ffa4955..34b3ad132421 100644 --- a/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalServerReplication.md +++ b/src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocalServerReplication.md @@ -17,8 +17,9 @@ Starts replication for the specified server. New-AzMigrateLocalServerReplication -MachineId -OSDiskID -SourceApplianceName -TargetApplianceName -TargetResourceGroupId -TargetStoragePathId -TargetVirtualSwitchId -TargetVMName [-IsDynamicMemoryEnabled ] - [-SubscriptionId ] [-TargetTestVirtualSwitchId ] [-TargetVMCPUCore ] - [-TargetVMRam ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-MigrateAsArcVM ] [-SubscriptionId ] [-TargetTestVirtualSwitchId ] + [-TargetVMCPUCore ] [-TargetVMRam ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] ``` ### ByIdPowerUser @@ -26,8 +27,9 @@ New-AzMigrateLocalServerReplication -MachineId -OSDiskID -Sour New-AzMigrateLocalServerReplication -DiskToInclude -MachineId -NicToInclude -SourceApplianceName -TargetApplianceName -TargetResourceGroupId -TargetStoragePathId -TargetVMName - [-IsDynamicMemoryEnabled ] [-SubscriptionId ] [-TargetVMCPUCore ] - [-TargetVMRam ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-IsDynamicMemoryEnabled ] [-MigrateAsArcVM ] [-SubscriptionId ] + [-TargetVMCPUCore ] [-TargetVMRam ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] ``` ## DESCRIPTION @@ -138,7 +140,7 @@ Accept wildcard characters: False Specifies the disks on the source server to be included for replication. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalDiskInput[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalDiskInput[] Parameter Sets: ByIdPowerUser Aliases: @@ -179,11 +181,26 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -MigrateAsArcVM +Specifies whether the VM should be migrated as an Arc VM. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NicToInclude Specifies the NICs on the source server to be included for replication. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput[] Parameter Sets: ByIdPowerUser Aliases: @@ -397,7 +414,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES diff --git a/src/Migrate/Migrate.Autorest/docs/README.md b/src/Migrate/Migrate.Autorest/docs/README.md index 888608999710..c166cf748460 100644 --- a/src/Migrate/Migrate.Autorest/docs/README.md +++ b/src/Migrate/Migrate.Autorest/docs/README.md @@ -1,5 +1,5 @@ # Docs -This directory contains the documentation of the cmdlets for the `Az.Migrate` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. +This directory contains the documentation of the cmdlets for the `Az.Migrate` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `../examples` folder. ## Info - Modifiable: no @@ -8,4 +8,4 @@ This directory contains the documentation of the cmdlets for the `Az.Migrate` mo - Packaged: yes ## Details -The process of documentation generation loads `Az.Migrate` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file +The process of documentation generation loads `Az.Migrate` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `../exports` folder. Additionally, when writing custom cmdlets in the `../custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `../examples` folder. \ No newline at end of file diff --git a/src/Migrate/Migrate.Autorest/docs/Remove-AzMigrateLocalServerReplication.md b/src/Migrate/Migrate.Autorest/docs/Remove-AzMigrateLocalServerReplication.md index fe693b37e81a..12528ca747cf 100644 --- a/src/Migrate/Migrate.Autorest/docs/Remove-AzMigrateLocalServerReplication.md +++ b/src/Migrate/Migrate.Autorest/docs/Remove-AzMigrateLocalServerReplication.md @@ -226,7 +226,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES diff --git a/src/Migrate/Migrate.Autorest/docs/Set-AzMigrateLocalServerReplication.md b/src/Migrate/Migrate.Autorest/docs/Set-AzMigrateLocalServerReplication.md index 10df4e66133d..4ca0e6ed2de5 100644 --- a/src/Migrate/Migrate.Autorest/docs/Set-AzMigrateLocalServerReplication.md +++ b/src/Migrate/Migrate.Autorest/docs/Set-AzMigrateLocalServerReplication.md @@ -88,7 +88,7 @@ Specifies the dynamic memory configuration of RAM. To construct, see NOTES section for DYNAMICMEMORYCONFIG properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.ProtectedItemDynamicMemoryConfig +Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.ProtectedItemDynamicMemoryConfig Parameter Sets: (All) Aliases: @@ -118,7 +118,7 @@ Accept wildcard characters: False Specifies the nics on the source server to be included for replication. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput[] Parameter Sets: (All) Aliases: @@ -243,7 +243,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES diff --git a/src/Migrate/Migrate.Autorest/docs/Start-AzMigrateLocalServerMigration.md b/src/Migrate/Migrate.Autorest/docs/Start-AzMigrateLocalServerMigration.md index 77fb2f167161..b9957d1aa5bc 100644 --- a/src/Migrate/Migrate.Autorest/docs/Start-AzMigrateLocalServerMigration.md +++ b/src/Migrate/Migrate.Autorest/docs/Start-AzMigrateLocalServerMigration.md @@ -233,7 +233,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES diff --git a/src/Migrate/Migrate.Autorest/generate-info.json b/src/Migrate/Migrate.Autorest/generate-info.json index d3a777410a31..57720f5084a9 100644 --- a/src/Migrate/Migrate.Autorest/generate-info.json +++ b/src/Migrate/Migrate.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "16bb7afe-8ed4-4a71-ad0d-44d35c30243f" + "generate_Id": "70101746-1d42-4ca8-ab55-09e486151be1" } diff --git a/src/Migrate/Migrate.Autorest/resources/README.md b/src/Migrate/Migrate.Autorest/resources/README.md index 937f07f8fec2..736492341e3d 100644 --- a/src/Migrate/Migrate.Autorest/resources/README.md +++ b/src/Migrate/Migrate.Autorest/resources/README.md @@ -1,5 +1,5 @@ # Resources -This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `../custom` folder. ## Info - Modifiable: yes diff --git a/src/Migrate/Migrate.Autorest/test/README.md b/src/Migrate/Migrate.Autorest/test/README.md index 7c752b4c8c43..1969200c6a09 100644 --- a/src/Migrate/Migrate.Autorest/test/README.md +++ b/src/Migrate/Migrate.Autorest/test/README.md @@ -1,5 +1,5 @@ # Test -This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `../custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. ## Info - Modifiable: yes diff --git a/src/Migrate/Migrate.sln b/src/Migrate/Migrate.sln index eac6674ed04f..48daa438bdde 100644 --- a/src/Migrate/Migrate.sln +++ b/src/Migrate/Migrate.sln @@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Migrate", "Migrate\Migrate. EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Migrate.Autorest", "Migrate.Autorest", "{9AA2C35A-2264-B74D-8556-EB72BD88EE60}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Migrate", "..\..\generated\Migrate\Migrate.Autorest\Az.Migrate.csproj", "{B5AD4A73-4A71-429B-8A83-827092E5683B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Migrate", "..\..\generated\Migrate\Migrate.Autorest\Az.Migrate.csproj", "{61624D8A-FD96-4107-A0F8-D50B1B811797}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -117,18 +117,18 @@ Global {1847EC8D-87A5-4772-9E75-1DEA1DC531EE}.Release|x64.Build.0 = Release|Any CPU {1847EC8D-87A5-4772-9E75-1DEA1DC531EE}.Release|x86.ActiveCfg = Release|Any CPU {1847EC8D-87A5-4772-9E75-1DEA1DC531EE}.Release|x86.Build.0 = Release|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Debug|x64.ActiveCfg = Debug|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Debug|x64.Build.0 = Debug|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Debug|x86.ActiveCfg = Debug|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Debug|x86.Build.0 = Debug|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Release|Any CPU.Build.0 = Release|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Release|x64.ActiveCfg = Release|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Release|x64.Build.0 = Release|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Release|x86.ActiveCfg = Release|Any CPU - {B5AD4A73-4A71-429B-8A83-827092E5683B}.Release|x86.Build.0 = Release|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Debug|x64.ActiveCfg = Debug|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Debug|x64.Build.0 = Debug|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Debug|x86.ActiveCfg = Debug|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Debug|x86.Build.0 = Debug|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Release|Any CPU.Build.0 = Release|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Release|x64.ActiveCfg = Release|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Release|x64.Build.0 = Release|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Release|x86.ActiveCfg = Release|Any CPU + {61624D8A-FD96-4107-A0F8-D50B1B811797}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -140,6 +140,6 @@ Global {FB2B969F-E6FB-4E6E-9D2A-E52F4F53F51F} = {2D0176AD-AE30-4235-9D62-17043F0D4CD8} {D8D28132-CE20-45C8-8476-6B88C891D945} = {2D0176AD-AE30-4235-9D62-17043F0D4CD8} {B799EA2F-9E28-421A-9301-BB061C6ADDC2} = {2D0176AD-AE30-4235-9D62-17043F0D4CD8} - {B5AD4A73-4A71-429B-8A83-827092E5683B} = {9AA2C35A-2264-B74D-8556-EB72BD88EE60} + {61624D8A-FD96-4107-A0F8-D50B1B811797} = {9AA2C35A-2264-B74D-8556-EB72BD88EE60} EndGlobalSection EndGlobal diff --git a/src/Migrate/Migrate/Az.Migrate.psd1 b/src/Migrate/Migrate/Az.Migrate.psd1 index fc6139bcabd5..3739271abc97 100644 --- a/src/Migrate/Migrate/Az.Migrate.psd1 +++ b/src/Migrate/Migrate/Az.Migrate.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 3/16/2026 +# Generated on: 3/27/2026 # @{ diff --git a/src/Migrate/Migrate/help/Get-AzMigrateLocalJob.md b/src/Migrate/Migrate/help/Get-AzMigrateLocalJob.md index 147526d5592a..1ef41330fb47 100644 --- a/src/Migrate/Migrate/help/Get-AzMigrateLocalJob.md +++ b/src/Migrate/Migrate/help/Get-AzMigrateLocalJob.md @@ -448,7 +448,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES diff --git a/src/Migrate/Migrate/help/Get-AzMigrateLocalReplicationFabric.md b/src/Migrate/Migrate/help/Get-AzMigrateLocalReplicationFabric.md index 7ca42f588f2b..9a9c3daa08cb 100644 --- a/src/Migrate/Migrate/help/Get-AzMigrateLocalReplicationFabric.md +++ b/src/Migrate/Migrate/help/Get-AzMigrateLocalReplicationFabric.md @@ -260,7 +260,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IFabricModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IFabricModel ## NOTES diff --git a/src/Migrate/Migrate/help/Get-AzMigrateLocalServerReplication.md b/src/Migrate/Migrate/help/Get-AzMigrateLocalServerReplication.md index f3f571b32d30..553f916521e2 100644 --- a/src/Migrate/Migrate/help/Get-AzMigrateLocalServerReplication.md +++ b/src/Migrate/Migrate/help/Get-AzMigrateLocalServerReplication.md @@ -288,7 +288,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IProtectedItemModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IProtectedItemModel ## NOTES diff --git a/src/Migrate/Migrate/help/New-AzMigrateLocalDiskMappingObject.md b/src/Migrate/Migrate/help/New-AzMigrateLocalDiskMappingObject.md index 9d4f307b1966..4c211e02bf37 100644 --- a/src/Migrate/Migrate/help/New-AzMigrateLocalDiskMappingObject.md +++ b/src/Migrate/Migrate/help/New-AzMigrateLocalDiskMappingObject.md @@ -138,7 +138,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalDiskInput +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalDiskInput ## NOTES diff --git a/src/Migrate/Migrate/help/New-AzMigrateLocalNicMappingObject.md b/src/Migrate/Migrate/help/New-AzMigrateLocalNicMappingObject.md index 2392758d6986..e458defc75a4 100644 --- a/src/Migrate/Migrate/help/New-AzMigrateLocalNicMappingObject.md +++ b/src/Migrate/Migrate/help/New-AzMigrateLocalNicMappingObject.md @@ -107,7 +107,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput ## NOTES diff --git a/src/Migrate/Migrate/help/New-AzMigrateLocalServerReplication.md b/src/Migrate/Migrate/help/New-AzMigrateLocalServerReplication.md index 41e86fb4977c..1ec6ee132a04 100644 --- a/src/Migrate/Migrate/help/New-AzMigrateLocalServerReplication.md +++ b/src/Migrate/Migrate/help/New-AzMigrateLocalServerReplication.md @@ -17,9 +17,9 @@ Starts replication for the specified server. New-AzMigrateLocalServerReplication -MachineId -TargetStoragePathId -TargetResourceGroupId -TargetVMName -SourceApplianceName -TargetApplianceName -TargetVirtualSwitchId -OSDiskID [-TargetVMCPUCore ] - [-TargetTestVirtualSwitchId ] [-IsDynamicMemoryEnabled ] [-TargetVMRam ] - [-SubscriptionId ] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + [-TargetTestVirtualSwitchId ] [-IsDynamicMemoryEnabled ] [-MigrateAsArcVM ] + [-TargetVMRam ] [-SubscriptionId ] [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` ### ByIdPowerUser @@ -27,9 +27,9 @@ New-AzMigrateLocalServerReplication -MachineId -TargetStoragePathId -TargetStoragePathId -TargetResourceGroupId -TargetVMName -SourceApplianceName -TargetApplianceName [-TargetVMCPUCore ] [-IsDynamicMemoryEnabled ] - [-TargetVMRam ] [-SubscriptionId ] -DiskToInclude - -NicToInclude [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + [-MigrateAsArcVM ] [-TargetVMRam ] [-SubscriptionId ] + -DiskToInclude -NicToInclude [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -140,7 +140,7 @@ Accept wildcard characters: False Specifies the disks on the source server to be included for replication. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalDiskInput[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalDiskInput[] Parameter Sets: ByIdPowerUser Aliases: @@ -181,11 +181,26 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -MigrateAsArcVM +Specifies whether the VM should be migrated as an Arc VM. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NicToInclude Specifies the NICs on the source server to be included for replication. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput[] Parameter Sets: ByIdPowerUser Aliases: @@ -399,7 +414,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES diff --git a/src/Migrate/Migrate/help/Remove-AzMigrateLocalServerReplication.md b/src/Migrate/Migrate/help/Remove-AzMigrateLocalServerReplication.md index d865f1d03e98..1846f4d1bdf1 100644 --- a/src/Migrate/Migrate/help/Remove-AzMigrateLocalServerReplication.md +++ b/src/Migrate/Migrate/help/Remove-AzMigrateLocalServerReplication.md @@ -228,7 +228,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES diff --git a/src/Migrate/Migrate/help/Set-AzMigrateLocalServerReplication.md b/src/Migrate/Migrate/help/Set-AzMigrateLocalServerReplication.md index 3f6b23a01cb7..0c06dc862796 100644 --- a/src/Migrate/Migrate/help/Set-AzMigrateLocalServerReplication.md +++ b/src/Migrate/Migrate/help/Set-AzMigrateLocalServerReplication.md @@ -88,7 +88,7 @@ Specifies the dynamic memory configuration of RAM. To construct, see NOTES section for DYNAMICMEMORYCONFIG properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.ProtectedItemDynamicMemoryConfig +Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.ProtectedItemDynamicMemoryConfig Parameter Sets: (All) Aliases: @@ -118,7 +118,7 @@ Accept wildcard characters: False Specifies the nics on the source server to be included for replication. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalNicInput[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.AzLocalNicInput[] Parameter Sets: (All) Aliases: @@ -243,7 +243,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES diff --git a/src/Migrate/Migrate/help/Start-AzMigrateLocalServerMigration.md b/src/Migrate/Migrate/help/Start-AzMigrateLocalServerMigration.md index 620b2129e49b..3d3e6457596e 100644 --- a/src/Migrate/Migrate/help/Start-AzMigrateLocalServerMigration.md +++ b/src/Migrate/Migrate/help/Start-AzMigrateLocalServerMigration.md @@ -234,7 +234,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel +### Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20260201.IJobModel ## NOTES