Skip to content

Commit 4d2b78d

Browse files
committed
Update Kusto Graph Explorer Queries.md
1 parent d14120a commit 4d2b78d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

AZURE/Kusto Graph Explorer Queries.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Resources
8080

8181

8282

83-
### Find by IP address
83+
### Find Resource by IP address
8484
```
8585
Resources
8686
| where type =~ "microsoft.network/networkinterfaces" and isnotempty(properties.ipConfigurations)
@@ -94,6 +94,14 @@ Resources
9494
| project publicIPid=id, publicIPaddr) on publicIPid
9595
```
9696

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+
97105

98106

99107
### List Azure Bastion Hosts with IP Addresses

0 commit comments

Comments
 (0)