Skip to content

Commit 3c7d24a

Browse files
authored
Update Get-AzNetworkWatcherNextHop.md (#14813)
Get-AzVM output object properties have changed. Now $vm.NetworkProfile.NetworkInterfaces.Id would provide the interface IDs.
1 parent cc5813a commit 3c7d24a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Network/Network/help/Get-AzNetworkWatcherNextHop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Next hop allows you to view the type of Azure resource, the associated IP addres
4444
$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
4545
$networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName
4646
$VM = Get-AzVM -ResourceGroupName ContosoResourceGroup -Name VM0
47-
$Nics = Get-AzNetworkInterface | Where {$_.Id -eq $vm.NetworkInterfaceIDs.ForEach({$_})}
47+
$Nics = Get-AzNetworkInterface | Where {$_.Id -eq $vm.NetworkProfile.NetworkInterfaces.Id.ForEach({$_})}
4848
Get-AzNetworkWatcherNextHop -NetworkWatcher $networkWatcher -TargetVirtualMachineId $VM.Id -SourceIPAddress $nics[0].IpConfigurations[0].PrivateIpAddress -DestinationIPAddress 204.79.197.200
4949
5050

0 commit comments

Comments
 (0)