Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

get nsg of vm az

vm_name="myvm"
vm_rg="myrg"
nic_id=`az vm nic list -g $vm_rg --vm-name $vm_name --query "[].{id:id}"`
# echo to make sure we're getting the right value. 
echo $nic_id
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nsg #vm #az
ADD COMMENT
Topic
Name
1+3 =