Test-Port

SYNOPSIS

Test a port

SYNTAX

Test-Port [-ComputerName] <String[]> [-Port] <Int32> [-Count <Int32>] [-Delay <Int32>] [-TcpTimeout <Int32>]
 [-UdpTimeout <Int32>] [-Tcp] [-Udp] [<CommonParameters>]

DESCRIPTION

Test a port

EXAMPLES

Example 1

PS C:\> Test-Port -ComputerName Host1,Host2 -Port 4711 -Count 7 -Tcp

Tests 7 times if the TCP port 4711 is opened on Host1 and Host2

PARAMETERS

-ComputerName

The hosts to test (hostnames or IP addresses)

Type: String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Port

The port to test

Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Count

The number of packages to send

Type: Int32
Parameter Sets: (All)
Aliases:

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

-Delay

The delay in milliseconds between each package

Type: Int32
Parameter Sets: (All)
Aliases:

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

-TcpTimeout

The TCP timeout in milliseconds

Type: Int32
Parameter Sets: (All)
Aliases:

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

-UdpTimeout

THe UDP timeout in milliseconds

Type: Int32
Parameter Sets: (All)
Aliases:

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

-Tcp

Indicates that TCP is used

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Udp

Indicates that UDP is used

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES