File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ Resources
80
80
81
81
82
82
83
- ### Find by IP address
83
+ ### Find Resource by IP address
84
84
```
85
85
Resources
86
86
| where type =~ "microsoft.network/networkinterfaces" and isnotempty(properties.ipConfigurations)
@@ -94,6 +94,14 @@ Resources
94
94
| project publicIPid=id, publicIPaddr) on publicIPid
95
95
```
96
96
97
+ ### Find VM given its network interface ID
98
+ $KustoFindVMbyInterfaceID = 'Resources
99
+ | where type =~ "microsoft.compute/virtualmachines"
100
+ | extend networkProfile = tostring(properties.networkProfile)
101
+ | extend computerName = properties.osProfile.computerName
102
+ | mv-expand networkInterfaces = properties.networkProfile.networkInterfaces
103
+ | where networkInterfaces.id =~ "%%ID%%"'
104
+
97
105
98
106
99
107
### List Azure Bastion Hosts with IP Addresses
You can’t perform that action at this time.
0 commit comments