Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

How to assign Tags during the creation of an Azure VM

$
0
0
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!


Viewing all articles
Browse latest Browse all 12545


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>