hi,
I want to assign assign 2nd NICs to VM in Azure but errors
i fallow this article from 2nd part (Add Another NIC to an Existing VM)
http://theithollow.com/2016/09/06/azure-network-interfaces/
below is my code
------------------ Start---------------------------------------
#Set Subscription Variables
Add-AzureAccount
$subscr="Visual Studio Ultimate with MSDN"
Get-AzureRmSubscription –SubscriptionName $subscr | Select-AzureRmSubscription
#Set Variables
$VMname = "Exchange"
$VMRG = "MigrationExc"
$NIC = "excN"
$NicRG = "MigrationExc"
###################################################
#DO NOT edit below this point #
###################################################
#Get the VM
$VM = Get-AzureRmVM -Name $VMname -ResourceGroupName $VMRG
#Get the NIC
$NewNIC = Get-AzureRmNetworkInterface -Name $NIC -ResourceGroupName $NICRG
#Add the NIC to the VM
$VM = Add-AzureRmVMNetworkInterface -VM $VM -Id $NewNIC.Id
#Reconfigure the VM
#NOTE ------- VM WILL BE RESTARTED!!!!!!!!!!!!!!!!!!!!
Update-AzureRmVM -VM $VM -ResourceGroupName $VMRG
-------------------------END-------------------------------------------
error after $VM = Get-AzureRmVM -Name $VMname -ResourceGroupName $VMRG
