Azure - Nic

> Azure

1 - About

Advertising

3 - Management

3.1 - Get Id

Get the Nic id from the VM

az.cmd vm show --resource-group myResourceGroup --name myVM -d --o tsv --query "networkProfile.networkInterfaces[].id"
/subscriptions/a3c34725-da090f6b96d44d/resourceGroups/myResrouceGroup/providers/Microsoft.Network/networkInterfaces/MY_MACHINE_01VMNic

3.2 - Show

az vm nic show --vm-name vmName  --resource-group resourceGName --nic nicId 

3.3 - Update

Associate the Network Security Group to a VM

az network nic update \
    --resource-group myResourceGroup \
    --name myNic \
    --network-security-group myNetworkSecurityGroup

3.4 - Network Security Group

Get the Network Security Group Id

az vm nic show --vm-name vmName   --nic nicId --resource-group resourceGroup --query networkSecurityGroup.id
"/subscriptions/a3c34725-da6a-41ac-87fa-06b96d44d/resourceGroups/resrouceGroupName/providers/Microsoft.Network/networkSecurityGroups/NameNSG"
Advertising
azure/nic.txt · Last modified: 2018/10/24 13:51 by gerardnico