@rr-4098 Here are the steps to do so:
Open Azure PowerShell and connect to your Azure account.
Run the following command to get the replication protected item.
Get-AzRecoveryServicesAsrReplicationProtectedItem -FriendlyName <VM name> -ProtectionContainer <Protection container>
<VM name> with the name of the replicated VM and
<Protection container> with the name of the protection container.
Run the following command to get the replication protected item properties:
$replicatedVMProperties = replicatedVM.ReplicationProtectedItemProperties
Run the following command to set the new VM size or type:
$replicatedVMProperties.TargetVmSize = <new VM size or type>
<new VM size or type> with the new VM size or type that you want to use.
Run the following command to update the replication protected item:
Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $replicatedVM
Once you have changed the VM size or type, the replicated VM will use the new settings after failover. Note that changing the VM size or type may affect the performance and functionality of the replicated VM, so you should test the changes before failover to ensure that they meet your requirements.
Let us know how it goes!