< Back

Start-AzureRmNetworkWatcherResourceTroubleshooting

Tue Jan 29, 2019 9:58 pm

NAME Start-AzureRmNetworkWatcherResourceTroubleshooting



SYNOPSIS

Starts troubleshooting on a Networking resource in Azure.





SYNTAX

Start-AzureRmNetworkWatcherResourceTroubleshooting [-DefaultProfile <IAzureContextContainer>] -NetworkWatcher <PSNetworkWatcher> -StorageId

<String> -StoragePath <String> -TargetResourceId <String> [<CommonParameters>]



Start-AzureRmNetworkWatcherResourceTroubleshooting [-DefaultProfile <IAzureContextContainer>] -NetworkWatcherName <String> -ResourceGroupName

<String> -StorageId <String> -StoragePath <String> -TargetResourceId <String> [<CommonParameters>]





DESCRIPTION

The Start-AzureRmNetworkWatcherResourceTroubleshooting cmdlet starts troubleshooting for a Networking resource in Azure and returns information

about potential issues and mitigations. Currently Virtual Network Gateways and Connections are supported.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NetworkWatcher <PSNetworkWatcher>

The network watcher resource.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-NetworkWatcherName <String>

The name of network watcher.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ResourceGroupName <String>

The name of the network watcher resource group.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-StorageId <String>

The storage ID.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-StoragePath <String>

The storage path.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TargetResourceId <String>

Specifies the resource id of the resource to troubleshoot. Example format:

"/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.Network/connections/${connectionName}"



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Commands.Network.Models.PSNetworkWatcher

System.String





OUTPUTS

Microsoft.Azure.Commands.Network.Models.PSViewNsgRules







NOTES





Keywords: azure, azurerm, arm, resource, management, manager, network, networking, network watcher, troubleshoot, VPN, connection



--- Example 1: Start Troubleshooting on a Virtual Network Gateway ---



$nw = Get-AzurermResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }

$networkWatcher = Get-AzureRmNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName



$target = '/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateway

s/{vnetGatewayName}'

$storageId = '/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{s

torageAccountName}'

$storagePath = 'https://{storageAccountName}.blob.core.windows.net/troubleshoot'



Start-AzureRmNetworkWatcherResourceTroubleshooting -NetworkWatcher $networkWatcher -TargetResourceId $target -StorageId $storageId -StoragePath

$storagePath



The above sample starts troubleshooting on a virtual network gateway. The operation may take a few minutes to complete.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... leshooting

Get-AzureRmNetworkWatcherTroubleshootingResult

New-AzureRmNetworkWatcher

Get-AzureRmNetworkWatcher

Remove-AzureRmNetworkWatcher

New-AzureRmNetworkWatcherPacketCapture

New-AzureRmPacketCaptureFilterConfig

Get-AzureRmNetworkWatcherPacketCapture

Remove-AzureRmNetworkWatcherPacketCapture

Stop-AzureRmNetworkWatcherPacketCapture

Test-AzureRmNetworkWatcherIPFlow

Get-AzureRmNetworkWatcherNextHop

Get-AzureRmNetworkWatcherSecurityGroupView

Get-AzureRmNetworkWatcherTopology