I'm having trouble using the -vCore param for the Restore-AzSqlDatabase function.
I have the below query, which works fine and duplicates the compute gen and vCore settings of the sourceDB.
Restore-AzSqlDatabase -FromPointInTimeBackup -PointInTime $dateTime -ResourceGroupName $database.ResourceGroupName -ServerName $database.ServerName -TargetDatabaseName $targetDB -Edition $edition -ServiceObjectiveName $database.CurrentServiceObjectiveName -ResourceId $database.ResourceID
However, when I add the -VCore param (as per the below) the query fails (via an azure devops pipeline).
Restore-AzSqlDatabase -FromPointInTimeBackup -PointInTime $dateTime -ResourceGroupName $database.ResourceGroupName -ServerName $database.ServerName -TargetDatabaseName $targetDB -Edition $edition -ServiceObjectiveName $database.CurrentServiceObjectiveName -ResourceId $database.ResourceID -VCore 1
The error I see is.
System.Management.Automation.ParameterBindingException: Parameter set cannot be resolved using the specified named parameters.
I've also tried adding the -ComputeGeneration param with no luck.
Restore-AzSqlDatabase -FromPointInTimeBackup -PointInTime $dateTime -ResourceGroupName $database.ResourceGroupName -ServerName $database.ServerName -TargetDatabaseName $targetDB -Edition $edition -ServiceObjectiveName $database.CurrentServiceObjectiveName -ResourceId $database.ResourceID -ComputeGeneration "Gen5" -VCore 1
Also note that $edition = 'GeneralPurpose', the source db is General Purpose + serverless and the azure pipeline task is 'AzurePowerShell@5'.
Does anyone know how to successfully use the -VCore param to set the max number of vcores?
The MS provided doco, isn't giving me any clues.