Set-AmsRouterEndpoint

SYNOPSIS

Sets the AmsConfiguration (Loopback address and port, RouterEndpoint).

SYNTAX

Set-AmsRouterEndpoint [[-IP] <IPAddress>] [[-Port] <Int32>] [-Quiet] [-Force]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

This Cmdlet sets the AmsConfiguration setting of the current running process.

By default the AdsClients and AdsServers are connected to the TwinCAT Router./\>

Actually the this Cmdlet doesn't work properly.

Please use the 'AMSROUTER_LOOPBACK_IP', and 'AMSROUTER_LOOPBACK_PORT' environment variables to set the Router Loopback endpoint.

The environment variables must be set at the hosting process before the 'TcXaeMgmt' module is loaded!

Ideally, this Cmdlet is called first after loading the TcXaeMgmt module to configure the system.

The involved communication uses the local Loopback address with port 0xBF02 by default.

To enable virtualization scenarios, where AdsClient / AdsServer / Router applications run in their own (virtual) environment, this address has to be changed for the actual running process.

This can be done in two different ways: 1.Setting of the following Environment Variables before this Powershell Module (TcXaeMgmt) is loaded: $env:AmsConfiguration:LoopbackAddress = "168.0.1.1" $env:AmsConfiguration:LoopbackPort = "1234" Both Variables are optional 2.Set the AmsConfiguration with the 'Set-AmsRouterEndpoint' Cmdlet.

When processing this Cmdlet, all prexisting open AdsSessions will be invalid.\> The Default RouterEndpoint is IPAddess:127.0.0.1 and Port 0xBF02.

EXAMPLES

EXAMPLE 1

PS > Set-AmsRouterEndpoint -IP '168.0.1.1' -Port 1234
            Set the process wide RouterEndpoint to IPAddress '168.0.1.1' and port 1234.

PARAMETERS

-IP

The state/value to set.

Type: IPAddress
Parameter Sets: (All)
Aliases:

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

-Port

The state/value to set.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-Quiet

The Quiet parameter suppresses the 'ShouldProcess' messsage and the Cmdlet will be processed without further user confirmation.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: Silent

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

-Force

Forces the command (no confirmation, Resets the FailFastHandler)

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
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

-WhatIf

Shows what would happen if the cmdlet runs.

The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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