Since adding an NIC to an Azure VM requires the VM to be in a Stopped (Deallocated) state, you will have to run the following cmdlets:
$VM = Get-AzureRMVM -Name PacktPubVMPS -ResourceGroupName PacktPubStop-AzureRMVM -Name $VM -ResourceGroupName PacktPub
Next, you have to retrieve the subnet info to which the NIC will be assigned by running the following cmdlet:
$Subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name NSubnet-VirtualNetwork $VNet
After that, you can create the additional NIC by running the following cmdlet:
$AdditionalNIC = New-AzureRmNetworkInterface -ResourceGroupName PacktPub -Name AddNICPS -Location WestEurope -SubnetId $Subnet.Id
You can also create the NIC using the ...