Test-AdsRoute

SYNOPSIS

Test the specified route connection.

SYNTAX

AddressStr (Default)

Test-AdsRoute [[-Name] <String[]>] [[-Port] <Int32[]>] [-SourceRoute <RouteTarget>] [-Mode <PingStrategy>]
 [-ScanSeconds <Int32>] [-Count <Int32>] [-Delay <Int32>] [-DefaultPorts] [-OnlinePorts] [-Quiet]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

NetId

Test-AdsRoute -NetId <AmsNetId[]> [[-Port] <Int32[]>] [-SourceRoute <RouteTarget>] [-Mode <PingStrategy>]
 [-ScanSeconds <Int32>] [-Count <Int32>] [-Delay <Int32>] [-DefaultPorts] [-OnlinePorts] [-Quiet]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Route

Test-AdsRoute [[-Port] <Int32[]>] [-SourceRoute <RouteTarget>] -InputObject <RouteTargetCollection>
 [-Mode <PingStrategy>] [-ScanSeconds <Int32>] [-Count <Int32>] [-Delay <Int32>] [-DefaultPorts] [-OnlinePorts]
 [-Quiet] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This Cmdlet establishes a connection to the specified target system and tests if the connection is working.

A Port scan can be executed.

EXAMPLES

EXAMPLE 1

PS> Test-AdsRoute -Port 851

Name                 NetId             Port   Latency Result
                                               (ms)
----                 -----             ----   ------- ------
CX-11111             192.168.0.2.1.1   851    3       Ok

Test the Port 851 of the local system (PLC 1) for availablity.

EXAMPLE 2

PS> Get-AdsRoute | Test-AdsRoute

Name                 NetId             Port   Latency Result
                                              (ms)
----                 -----             ----   ------- ------
CX-11111             192.168.0.2.1.1   10000  4       Ok
CX-22222             192.168.0.3.1.1   10000          Failed
CX-33333             192.168.0.4.1.1   10000  4       Ok

Get the locally registered routes and test if they are reachable (on AmsPort 10000)

EXAMPLE 3

PS> Test-AdsRoute -OnlinePorts

Name                 NetId             Port   Latency Result
   (ms)
----                 -----             ----   ------- ------
CX-11111             192.168.0.2.1.1   10     0.6     Ok
CX-11111             192.168.0.2.1.1   11     1.3     Ok
CX-11111             192.168.0.2.1.1   12     1.2     Ok
CX-11111             192.168.0.2.1.1   30     3       Ok
CX-11111             192.168.0.2.1.1   131    75      Ok
CX-11111             192.168.0.2.1.1   32829  125     Ok
CX-11111             192.168.0.2.1.1   340    122     Ok
CX-11111             192.168.0.2.1.1   850    171     Ok
CX-11111             192.168.0.2.1.1   32830  174     Ok
CX-11111             192.168.0.2.1.1   351    171     Ok
CX-11111             192.168.0.2.1.1   350    172     Ok
CX-11111             192.168.0.2.1.1   270    219     Ok
CX-11111             192.168.0.2.1.1   851    220     Ok

Scans the propagated AmsPorts for the local system.

PARAMETERS

-Name

The name(s) or address(es) of the systems to test.

These can consist of RouteName, NetID, HostName or IPAddress.

Wildcards are permitted.

Type: String[]
Parameter Sets: AddressStr
Aliases: Address

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

-NetId

The NetId(s) of the target system to test (AmsNetId.Local by default)

Type: AmsNetId[]
Parameter Sets: NetId
Aliases:

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

-Port

The Port(s) of the target system to test.

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

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

-SourceRoute

The source system where to test the Route.

Type: RouteTarget
Parameter Sets: (All)
Aliases: Source

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

-InputObject

The routes targets to test with this Cmdlet.

Type: RouteTargetCollection
Parameter Sets: Route
Aliases: Destination

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

-Mode

The Ping Strategy (PingStrategy.Ads by default)

Possible values: None, IP, HostName, IPOrHostName, Ads, AdsGetState, AdsTestConnection, Default

Type: PingStrategy
Parameter Sets: (All)
Aliases:
Accepted values: None, IP, HostName, IPOrHostName, Ads, AdsGetState, AdsTestConnection, Default

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

-ScanSeconds

Sets timeout for each single test request.

The test fails if a (single) response isn't received before the timeout expires.

The default timeout is 2 seconds.

Type: Int32
Parameter Sets: (All)
Aliases: TTL, TimeToLive, TimeoutSeconds

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

-Count

Specifies the number of echo/ping requests to send.

The default value is 1.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-Delay

Specifies the interval between pings/tests, in seconds.

The default value is 1 Second.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-DefaultPorts

Tests all default ports.

The following ports will be tested: 10000, 300, 301, 302, 303, 501, 801, 811, 821, 831, 850, 851, 852, 853, 854, 855, 19200 The 'DefaultPorts' switch overrides the 'Port' parameter.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-OnlinePorts

Determines all active/online ports from the target and tests them.

The 'OnlinePorts' switch overrides the 'DefaultPorts' and 'Port' parameters.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Quiet

The Quiet mode.

Returns a boolean only ($true, if one ping succeeded and $false if all failed)

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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

TwinCAT.Ads.AmsNetId[]

The NetId(s) of the target system to test (AmsNetId.Local by default)

TwinCAT.RouteTargetCollection

The routes targets to test with this Cmdlet.

OUTPUTS

NOTES