New-AzureRmVm -Credential $Credential -ResourceGroupName "RGGroup55" -Name NewServer -ImageName Win10-N-x64 -Location "West US 2" -Size "Standard_DS2_v2" -VirtualNetworkName "TestVN" -SubnetName "TestVNSubnet" -OpenPorts 3389
Above is the code I'm using to create a VM in Azure. What I am not getting is how to apply tags to the VM during the creation. I noticed there is a -tag parameter, but it becomes unavailable using the code above after you start using additional parameters after -ResourceGroup. Do I have to add the tags in a separate operation after the VM is created?
Thanks for your help!