Get-TcLicense

SYNOPSIS

Get TwinCAT License information.

SYNTAX

NetIdPort (Default)

Get-TcLicense [-Name <String[]>] [-OrderId <String[]>] [-NetId <AmsNetId>] [-Status <LicenseStatus>] [-Force]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Route

Get-TcLicense [-Name <String[]>] [-OrderId <String[]>] -Route <IRoute> [-Status <LicenseStatus>] [-Force]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

AddressStr

Get-TcLicense [-Name <String[]>] [-OrderId <String[]>] -Address <String> [-Status <LicenseStatus>] [-Force]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Session

Get-TcLicense [-Name <String[]>] [-OrderId <String[]>] -Session <ISession> [-Status <LicenseStatus>] [-Force]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

SessionId

Get-TcLicense [-Name <String[]>] [-OrderId <String[]>] -SessionId <Int32> [-Status <LicenseStatus>] [-Force]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This Cmdlet gets information about TwinCAT licenses from the target system.

To contact the target system, it must be available as actual route or the local system.

EXAMPLES

EXAMPLE 1

PS> Get-TcLicense

Get the the valid licenses from the local system.

EXAMPLE 2

PS> $session = New-TcSession -Route TC3TESTA1-CP67X -Port 30
PS> $session | Get-TcLicense -Status All -name *scope*

Name                        Valid ValidityCode ExpireTime   Available Used VolumeNo
----                        ----- ------------ ----------   ---------   ---- --------
TC3 Scope Server                X        Valid            CPU License      0        0
TC3 Scope View Professional     X        Valid            CPU License      0        0

Create a session to the License Server on target 'TC3TESTA1-CP67X' and return all valid and invalid licenses that contain 'scope' in their name.

EXAMPLE 3

PS> Get-TcLicense -Route TC3TESTA1-CP67X -Status Valid

Name                             Valid ValidityCode ExpireTime   Available Used VolumeNo
----                             ----- ------------ ---------- ---------   ---- --------
TC3 C++ / MatSim                     X        Valid            CPU License    0        0
TC3 CNC                              X        Valid            CPU License    0        0
TC3 Target For Matlab Simulink       X        Valid            CPU License    0        0
TC3 CNC Axis                         X        Valid            CPU License    0        0
TC3 Serial-Communication             X        Valid            CPU License    0        0
TC3 NC PTP Axes Pack unlimited       X        Valid            CPU License    0        0
TC3 PLC / C++ / MatSim               X        Valid            CPU License    0        0
TC3 Kinematic Transformation L4      X        Valid            CPU License    0        0
TC3 NC Camming                       X        Valid            CPU License    0        0
TC3 PLC-HMI Web                      X        Valid            CPU License    0        0
TC3 NC Flying Saw                    X        Valid            CPU License    0        0
TC3 CNC Spline                       X        Valid            CPU License    0        0
TC3 SMS-SMTP                         X        Valid            CPU License    0        0
TC3 Hydraulic Positioning            X        Valid            CPU License    0        0
TC3 Kinematic Transformation L1      X        Valid            CPU License    0        0
...

Connect to the License Server on target 'TC3TESTa1-CP67X' and return all valid licenses.

EXAMPLE 4

> Get-TcLicense -NetId 172.17.60.153.1.1 -Status Invalid | format-list


Id                : 4c256767-e6e6-4af5-bd68-9f7abad0c200
Name              : TC3 ADS
ExpireTime        : 8/17/2017 12:00:00 AM
ValidityCode      : Expired
Valid             : False
AvailableLicenses : 0
UsedLicenses      : 0
VolumeNo          : 0

Id                : 66689887-ccbd-452c-ac9a-039d997c6e66
Name              : TC3 PLC
ExpireTime        : 8/17/2017 12:00:00 AM
ValidityCode      : Expired
Valid             : False
AvailableLicenses : 0
UsedLicenses      : 0
VolumeNo          : 0

Id                : 3ff18e97-7754-401b-93fb-70544de28a13
Name              : TC3 IO
ExpireTime        : 8/17/2017 12:00:00 AM
ValidityCode      : Expired
Valid             : False
AvailableLicenses : 0
UsedLicenses      : 0
VolumeNo          : 0

Connect to NetId 172.17.60.153.1.1, determine all invalid licenses and format the result into a list.

EXAMPLE 5

> Get-TcLicense -OrderId TE*

OrderID Name                             Valid ValidityCode ExpireTime   Available   Used VolumeNo
------- ----                             ----- ------------ ----------   ---------   ---- --------
TE1400 TC3 Target For Matlab Simulink        X        Valid            CPU License      0        0
TE1500 TC3 Valve-Diagram-Editor              X        Valid            CPU License      0        0
TE1120 TC3 XCAD Interface                    X        Valid            CPU License      0        0
TE1510 TC3 Cam-Design-Tool                   X        Valid            CPU License      0        0
TE1110 TC3 Simulation Manager                X        Valid            CPU License      0        0
TE1111 TC3 EtherCAT Simulation               X        Valid            CPU License      0        0
TE1410 TC3 Interface For Matlab Simulink     X        Valid            CPU License      0        0
TE1300 TC3 Scope View Professional           X        Valid            CPU License      0        0

Get the valid licenses from local system and filter them for OrderIds starting with TE*.

PARAMETERS

-Name

The name of the license to get.

Wildcards are permitted.

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

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

-OrderId

The OrderID of the license.

Wildcards are permitted.

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

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

-NetId

The NetID address of the target system where to load the licenses (Local by default).

Type: AmsNetId
Parameter Sets: NetIdPort
Aliases:

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

-Route

The Route object where to load the licenses from (RouteTarget.Local by default).

Type: IRoute
Parameter Sets: Route
Aliases: Destination

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

-Address

The address where to load the licenses.

This can be the RouteName, NetId, the HostName or the IPAddress.

Wildcards are permitted.

Type: String
Parameter Sets: AddressStr
Aliases:

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

-Session

The session object to use for license upload.

This must target port 30 (AmsPort.R0_LicenseServer).

Type: ISession
Parameter Sets: Session
Aliases: InputObject

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

-SessionId

The unique session Identifier that represents the session to use for the license upload.

Type: Int32
Parameter Sets: SessionId
Aliases: Id

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

-Status

The Status parameter selects the Licenses to return.

Available is 'Valid' (the valid licenses), 'Invalid' (the invalid licenses) and 'All' ('Valid' + 'Invalid') licenses.

The Default Value is 'All'

Possible values: None, Valid, Invalid, All

Type: LicenseStatus
Parameter Sets: (All)
Aliases:
Accepted values: None, Valid, Invalid, All

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

-Force

Force reading value.

This flag bypasses internal caches and 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

-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.IRoute

The Route object where to load the licenses from (RouteTarget.Local by default).

OUTPUTS

NOTES