external help file | Module Name | online version | schema |
---|---|---|---|
Microsoft.Azure.Commands.Network.dll-Help.xml |
AzureRM.Network |
2.0.0 |
Gets the next hop from a VM.
Get-AzureRmNetworkWatcherNextHop -NetworkWatcher <PSNetworkWatcher> -TargetVirtualMachineId <String>
-DestinationIPAddress <String> -SourceIPAddress <String> [-TargetNetworkInterfaceId <String>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
Get-AzureRmNetworkWatcherNextHop -NetworkWatcherName <String> -ResourceGroupName <String>
-TargetVirtualMachineId <String> -DestinationIPAddress <String> -SourceIPAddress <String>
[-TargetNetworkInterfaceId <String>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
Get-AzureRmNetworkWatcherNextHop -Location <String> -TargetVirtualMachineId <String>
-DestinationIPAddress <String> -SourceIPAddress <String> [-TargetNetworkInterfaceId <String>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
The Get-AzureRmNetworkWatcherNextHop cmdlet gets the next hop from a VM. Next hop allows you to view the type of Azure resource, the associated IP address of that resource, and the routing table rule that is responsible for the route.
$nw = Get-AzurermResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$networkWatcher = Get-AzureRmNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName
$VM = Get-AzurermVM -ResourceGroupName ContosoResourceGroup -Name VM0
$Nics = Get-AzureRmNetworkInterface | Where {$_.Id -eq $vm.NetworkInterfaceIDs.ForEach({$_})}
Get-AzureRmNetworkWatcherNextHop -NetworkWatcher $networkWatcher -TargetVirtualMachineId $VM.Id -SourceIPAddress $nics[0].IpConfigurations[0].PrivateIpAddress -DestinationIPAddress 204.79.197.200
NextHopIpAddress NextHopType RouteTableId
---------------- ----------- ------------
Internet System Route
Get's the Next Hop for outbound communication from the primary Network Interface on the specified Virtual Vachine to 204.79.197.200 (www.bing.com)
Run cmdlet in the background
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Destination IP address.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Location of the network watcher.
Type: System.String
Parameter Sets: SetByLocation
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The network watcher resource.
Type: Microsoft.Azure.Commands.Network.Models.PSNetworkWatcher
Parameter Sets: SetByResource
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The name of network watcher.
Type: System.String
Parameter Sets: SetByName
Aliases: Name
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The name of the network watcher resource group.
Type: System.String
Parameter Sets: SetByName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Source IP address.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Target network interface Id.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The target virtual machine ID.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Parameters: NetworkWatcher (ByValue)
Parameters: NetworkWatcherName (ByValue)
Keywords: azure, azurerm, arm, resource, management, manager, network, networking, network watcher, next, hop
Get-AzureRmNetworkWatcherNextHop
Get-AzureRmNetworkWatcherSecurityGroupView
Get-AzureRmNetworkWatcherTopology
Start-AzureRmNetworkWatcherResourceTroubleshooting
New-AzureRmNetworkWatcherPacketCapture
New-AzureRmPacketCaptureFilterConfig
Get-AzureRmNetworkWatcherPacketCapture
Remove-AzureRmNetworkWatcherPacketCapture
Stop-AzureRmNetworkWatcherPacketCapture
New-AzureRmNetworkWatcherProtocolConfiguration
Test-AzureRmNetworkWatcherIPFlow
Test-AzureRmNetworkWatcherConnectivity
Stop-AzureRmNetworkWatcherConnectionMonitor
Start-AzureRmNetworkWatcherConnectionMonitor
Set-AzureRmNetworkWatcherConnectionMonitor
Set-AzureRmNetworkWatcherConfigFlowLog
Remove-AzureRmNetworkWatcherConnectionMonitor
New-AzureRmNetworkWatcherConnectionMonitor
Get-AzureRmNetworkWatcherTroubleshootingResult
Get-AzureRMNetworkWatcherReachabilityReport
Get-AzureRmNetworkWatcherReachabilityProvidersList
Get-AzureRmNetworkWatcherFlowLogStatus