Microsoft Azure has the option to enable Accelerated Networking on VM's. More information on the feature can be found on here. This script that will enable/disable the function for you on existing VM's.
You can download the script from here.
The script works similar to the AvailabilitySet script made by Paulo Marques which uses the possibility of exporting the ARM template of the resource group and then prepare that template for redeployment with the correct values.
During the enable/disabling of the feature, the VM itself and ALL related NIC's are deleted and re-created.
Beware that if you use a dynamic Public IP address for the VM, the public IP address will change as the VM is redeployed
These functions uses Export-AzureRmResourceGroup, which means you will have a backup of your resource group in a file called OriginalTemplate-yyyy-MM-dd_hhmmss.json to recover from any issues. Beware that this cmdlet does not export any deployed extensions and diagnostics configuration, you will need to enable it manually later on.
See also http://blog.azureinfra.com