Azure / azure-powershell-migration

Tools and resources to help migrate PowerShell scripts between incompatible versions of Az and AzureRM modules
MIT License
35 stars 16 forks source link

New-AzUpgradeModulePlan: Cannot validate argument on parameter #101

Closed BenH-Puregym closed 9 months ago

BenH-Puregym commented 2 years ago

Component [] PowerShell module

Description of the issue I have simply installed the module as per this doc (https://docs.microsoft.com/en-us/powershell/azure/quickstart-migrate-azurerm-to-az-automatically?view=azps-7.1.0) and then run the following command: New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.2.0 -DirectoryPath . -OutVariable Plan

which gives me: New-AzUpgradeModulePlan: Cannot validate argument on parameter 'ToAzVersion'. The argument "5.2.0" does not belong to the set "6.1.0" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.

Have tried in PS 7 and running as admin but still doesn't work. Have also tried different Az versions.

dcaro commented 2 years ago

@BenH-Puregym we currently only support Az 6.1.0 as the target. Please use the following command: New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 6.1.0 -DirectoryPath . -OutVariable Plan

We plan to update the migration module to support Az 8 shortly after release (expected by June 2022).

YanaXu commented 2 years ago

/azp where

dcaro commented 9 months ago

We have updated the documentation related to this issue with the following PRs:

cc: @VeryEarly