Editar

Compartilhar via


New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject

Create protocol configuration used to perform test evaluation over TCP, HTTP or ICMP.

Syntax

New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject
   [-TcpProtocol]
   -Port <UInt16>
   [-DisableTraceRoute]
   [-DestinationPortBehavior <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject
   [-HttpProtocol]
   [-Port <UInt16>]
   [-Method <String>]
   [-Path <String>]
   [-RequestHeader <Hashtable>]
   [-ValidStatusCodeRange <String[]>]
   [-PreferHTTPS]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject
   [-IcmpProtocol]
   [-DisableTraceRoute]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject cmdlet creates protocol configuration used to perform test evaluation over TCP, HTTP or ICMP.

Examples

Example 1

$TcpProtocolConfiguration = New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject -TcpProtocol -Port 80 -DisableTraceRoute

Port              : 80
DisableTraceRoute : False

Example 2

Create protocol configuration used to perform test evaluation over TCP, HTTP or ICMP. (autogenerated)

New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject -IcmpProtocol

Parameters

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DestinationPortBehavior

Destination port behavior. Supported values are None, ListenIfAvailable.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableTraceRoute

Value indicating whether path evaluation with trace route should be disabled.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HttpProtocol

HTTP protocol switch.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-IcmpProtocol

ICMP protocol switch.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Method

The HTTP method to use.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Path

The path component of the URI. For instance, "/dir1/dir2".

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Port

The port to connect to.

Type:Nullable<T>[UInt16]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PreferHTTPS

Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RequestHeader

The HTTP headers to transmit with the request.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TcpProtocol

TCP protocol switch.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ValidStatusCodeRange

HTTP status codes to consider successful. For instance, "2xx,301-304,418".

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSNetworkWatcherConnectionMonitorTcpConfiguration

PSNetworkWatcherConnectionMonitorHttpConfiguration

PSNetworkWatcherConnectionMonitorIcmpConfiguration