Set-AmsNetId

SYNOPSIS

Sets the AmsNetId of a device.

SYNTAX

NetId (Default)

Set-AmsNetId [[-Target] <AmsNetId>] [-NewId] <AmsNetId> [-Timeout <Int32>] [-Force]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

Route

Set-AmsNetId [-NewId] <AmsNetId> [-InputObject] <IRoute> [-Timeout <Int32>] [-Force]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

AddressStr

Set-AmsNetId [-NewId] <AmsNetId> [-Address] <String> [-Timeout <Int32>] [-Force]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

Session

Set-AmsNetId [-NewId] <AmsNetId> -Session <ISession> [-Timeout <Int32>] [-Force]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

SessionId

Set-AmsNetId [-NewId] <AmsNetId> -SessionId <Int32> [-Timeout <Int32>] [-Force]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

This Cmdlet configurates the AmsNetId (TargetNetId) of a device.

A reboot is necessary after configuration (e.g.

with 'Restart-AdsComputer') To contact the target system, it must be available as actual route.

All actual connections to that systems via ADS are not valid anymore after calling this Cmdlet.

EXAMPLES

EXAMPLE 1

PS> Set-AmsNetId -NewId 1.1.1.1.1.1

Changeing AmsNetId of target system.
Change the NetId of system '192.168.0.2.1.1' to '1.1.1.1.1.1'
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
Changing the NetId of system '192.168.0.2.1.1' to '1.1.1.1.1.1' is succeeded. All preexisting connections to this system a invalid now. A reboot of this system is necessary!

Sets the AmsNetId of the Local system to '1.1.1.1.1.1'.

PARAMETERS

-Target

NetId of the target system.

Type: AmsNetId
Parameter Sets: NetId
Aliases:

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

-NewId

The New NetId.

Type: AmsNetId
Parameter Sets: (All)
Aliases:

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

-InputObject

The route object where to set the CPUs.

This parameter support pipelining.

Type: IRoute
Parameter Sets: Route
Aliases: Destination, Route

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

-Address

Target names/addresses where to configure the CPU.

Wildcards are permitted.

Type: String
Parameter Sets: AddressStr
Aliases: Name

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

-Session

The Session where to configure the CPU (supports pipeline)

Type: ISession
Parameter Sets: Session
Aliases:

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

-SessionId

Specifies the Session (with unique ID) where to configure the CPU Core settings.

Type: Int32
Parameter Sets: SessionId
Aliases:

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

-Timeout

The communication ADS timeout in milliseconds.

A value of 0 disables the timeout.

A value \<= 0 sets the Default (5000 ms).

Type: Int32
Parameter Sets: (All)
Aliases:

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

-Force

Forces this command.

It suppresses the ShouldContinue settings and bypasses the FailFastInterceptor to retry communication in every case.

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

TwinCAT.IRoute

The route object where to set the CPUs.

This parameter support pipelining.

TwinCAT.ISession

The Session where to configure the CPU (supports pipeline)

OUTPUTS

NOTES