Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Migrate")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.10.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.10.1")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.11.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.11.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
6 changes: 6 additions & 0 deletions src/Migrate/Migrate.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,3 +526,9 @@ directive:
model-name: Fabric
set:
suppress-format: true
- where:
verb: New
subject: ReplicationProtectionContainerMapping
set:
preview-announcement:
preview-message: "*****************************************************************************************\\r\\n* This cmdlet will undergo a breaking change in Az v16.0.0, to be released in May 2026. *\\r\\n* At least one change applies to this cmdlet. *\\r\\n* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *\\r\\n**************************************************************************************************"
4 changes: 2 additions & 2 deletions src/Migrate/Migrate.Autorest/custom/Az.Migrate.custom.psm1
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ https://learn.microsoft.com/powershell/module/az.migrate/get-azmigratediscovered
#>

function Get-AzMigrateDiscoveredServer {
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessage("**********************************************************************************************`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar is incorrect. It should be "to be released in May 2026" not "to be released on May 2026". The preposition "in" is correct for months, while "on" is used for specific dates.

Suggested change
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released in May 2026. *`n

Copilot uses AI. Check for mistakes.
* At least one change applies to this cmdlet. *`n
* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *`n
***************************************************************************************************")]
[OutputType(
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine],
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IHyperVMachine])]
Expand Down
5 changes: 5 additions & 0 deletions src/Migrate/Migrate.Autorest/custom/Get-AzMigrateJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ The Get-AzMigrateJob cmdlet retrieves the status of an Azure Migrate job.
https://learn.microsoft.com/powershell/module/az.migrate/get-azmigratejob
#>
function Get-AzMigrateJob {
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessage("**********************************************************************************************`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar is incorrect. It should be "to be released in May 2026" not "to be released on May 2026". The preposition "in" is correct for months, while "on" is used for specific dates.

Suggested change
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released in May 2026. *`n

Copilot uses AI. Check for mistakes.
* At least one change applies to this cmdlet. *`n
* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *`n
***************************************************************************************************")]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20250801.IJob])]
[CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)]
param(
Expand Down
5 changes: 5 additions & 0 deletions src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ The Get-AzMigrateLocalJob cmdlet retrieves the status of an Azure Migrate job.
https://learn.microsoft.com/powershell/module/az.migrate/get-azmigratelocaljob
#>
function Get-AzMigrateLocalJob {
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessage("**********************************************************************************************`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar is incorrect. It should be "to be released in May 2026" not "to be released on May 2026". The preposition "in" is correct for months, while "on" is used for specific dates.

Suggested change
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released in May 2026. *`n

Copilot uses AI. Check for mistakes.
* At least one change applies to this cmdlet. *`n
* 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.")]
Comment on lines +29 to 30
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function has two PreviewMessage attributes. The breaking change announcement attribute on lines 25-29 is duplicated with a different preview message attribute on line 30. This will likely cause conflicts. If both attributes are needed, verify that the runtime supports multiple PreviewMessage attributes, otherwise remove the duplicate or consolidate the messages.

Suggested change
***************************************************************************************************")]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")]
***************************************************************************************************`n
This cmdlet is based on a preview API version and may experience breaking changes in future releases.")]

Copilot uses AI. Check for mistakes.
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IJobModel])]
[CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ The Get-AzMigrateLocalServerReplication cmdlet retrieves the object for the repl
https://learn.microsoft.com/powershell/module/az.migrate/get-azmigratelocalserverreplication
#>
function Get-AzMigrateLocalServerReplication {
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessage("**********************************************************************************************`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar is incorrect. It should be "to be released in May 2026" not "to be released on May 2026". The preposition "in" is correct for months, while "on" is used for specific dates.

Suggested change
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released in May 2026. *`n

Copilot uses AI. Check for mistakes.
* At least one change applies to this cmdlet. *`n
* 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.")]
Comment on lines +29 to 30
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function has two PreviewMessage attributes. The breaking change announcement attribute on lines 25-29 is duplicated with a different preview message attribute on line 30. This will likely cause conflicts. If both attributes are needed, verify that the runtime supports multiple PreviewMessage attributes, otherwise remove the duplicate or consolidate the messages.

Suggested change
***************************************************************************************************")]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute("This cmdlet is based on a preview API version and may experience breaking changes in future releases.")]
***************************************************************************************************`n
`n
This cmdlet is based on a preview API version and may experience breaking changes in future releases.")]

Copilot uses AI. Check for mistakes.
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.IProtectedItemModel])]
[CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ The Get-AzMigrateServerReplication cmdlet retrieves the object for the replicati
https://learn.microsoft.com/powershell/module/az.migrate/get-azmigrateserverreplication
#>
function Get-AzMigrateServerReplication {
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessage("**********************************************************************************************`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar is incorrect. It should be "to be released in May 2026" not "to be released on May 2026". The preposition "in" is correct for months, while "on" is used for specific dates.

Suggested change
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released in May 2026. *`n

Copilot uses AI. Check for mistakes.
* At least one change applies to this cmdlet. *`n
* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *`n
***************************************************************************************************")]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20250801.IMigrationItem])]
[CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)]
param(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ The New-AzMigrateDiskMapping cmdlet creates a mapping of the source disk attache
https://learn.microsoft.com/powershell/module/az.migrate/new-azmigratediskmapping
#>
function New-AzMigrateDiskMapping {
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessage("**********************************************************************************************`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar is incorrect. It should be "to be released in May 2026" not "to be released on May 2026". The preposition "in" is correct for months, while "on" is used for specific dates.

Suggested change
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released in May 2026. *`n

Copilot uses AI. Check for mistakes.
* At least one change applies to this cmdlet. *`n
* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *`n
***************************************************************************************************")]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20250801.IVMwareCbtDiskInput])]
[CmdletBinding(DefaultParameterSetName = 'VMwareCbt', PositionalBinding = $false)]
param(
Expand Down
5 changes: 5 additions & 0 deletions src/Migrate/Migrate.Autorest/custom/New-AzMigrateProject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ https://learn.microsoft.com/powershell/module/az.migrate/new-azmigrateproject
#>

function New-AzMigrateProject {
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessage("**********************************************************************************************`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar is incorrect. It should be "to be released in May 2026" not "to be released on May 2026". The preposition "in" is correct for months, while "on" is used for specific dates.

Suggested change
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released in May 2026. *`n

Copilot uses AI. Check for mistakes.
* At least one change applies to this cmdlet. *`n
* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *`n
***************************************************************************************************")]
[CmdletBinding(DefaultParameterSetName='PutExpandedCustom', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param (
[Parameter(ParameterSetName='PutExpandedCustom', Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ The New-AzMigrateServerReplication cmdlet starts the replication for a particula
https://learn.microsoft.com/powershell/module/az.migrate/new-azmigrateserverreplication
#>
function New-AzMigrateServerReplication {
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessage("**********************************************************************************************`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar is incorrect. It should be "to be released in May 2026" not "to be released on May 2026". The preposition "in" is correct for months, while "on" is used for specific dates.

Suggested change
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released on May 2026. *`n
* This cmdlet will undergo a breaking change in Az v16.0.0, to be released in May 2026. *`n

Copilot uses AI. Check for mistakes.
* At least one change applies to this cmdlet. *`n
* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *`n
***************************************************************************************************")]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20250801.IJob])]
[CmdletBinding(DefaultParameterSetName = 'ByIdDefaultUser', PositionalBinding = $false)]
param(
Expand Down
8 changes: 4 additions & 4 deletions src/Migrate/Migrate.Autorest/custom/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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.
2 changes: 1 addition & 1 deletion src/Migrate/Migrate.Autorest/docs/Az.Migrate.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.Migrate
Module Guid: f153e017-733d-493f-a276-5b92bb3eace1
Module Guid: 1e28f0b4-1cb3-4e57-ae54-b783789ddc1f
Download Help Link: https://learn.microsoft.com/powershell/module/az.migrate
Help Version: 1.0.0.0
Locale: en-US
Expand Down
Loading