I am restoring a backup from one resource group to another, both the disks and the VM. I am able to restore everything to the new resource group, however, the new VM is attached to the old resource groups Virtual Network.
I am trying to replicate the functionality of the portal see the attached screen shot.

One can select the Resource Group and Virtual Network to assign to the restored VM. How can I do this via the CLI Interface?
Here is my current command:
az deployment group create --subscription $subscription --resource-group $toResourceGroup --name $vnetName --template-uri "$url?$token" --no-wait --parameters VirtualMachineName=$toVMName
