Get-TcLicense

SYNOPSIS

Get TwinCAT License information.

SYNTAX

AddressStr (Default)

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

NetIdPort

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

Route

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

Session

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

SessionId

Get-TcLicense [-Name <String[]>] [-OrderId <String[]>] -SessionId <Int32> [-Status <LicenseStatus>] [-Force]
 [<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 PLC-East -Port 30
PS> Get-TcLicense -Status All -name *scope* -session $session

OrderID Name                         Validity ExpireTime Available Used VolumeNo
------- ----                         -------- ---------- --------- ---- --------
TF3300  TC3 Scope Server             Valid               CPU       0    0
TE1300  TC3 Scope View Professional  Valid               CPU       0    0

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

Example 3

PS> Get-TcLicense -Route PLC-East -Status Valid

OrderID Name                         Validity ExpireTime Available Used VolumeNo
------- ----                         -------- ---------- --------- ---- --------
TC1000  TC3 ADS                      Valid               CPU       0    0
TC1200  TC3 PLC                      Valid               CPU       1    0
TC1100  TC3 IO                       Valid               CPU       0    0
TF5000  TC3 NC PTP                   Valid               CPU       0    0
TF5020  TC3 NC PTP Axes Pack unlim.. Valid               CPU       0    0
TF5110  TC3 Kinematic Transformat..  Valid               CPU       0    0
TF6311  TC3 TCP/UDP RT               Valid               CPU       0    0
...

Connect to the License Server on target 'PLC-East' and return all valid licenses.

Example 4

PS> 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

PS> Get-TcLicense -OrderId TE*

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

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

PARAMETERS

-Name

The name(s) of the license to filter for. Wildcards are permitted. The License names to filter for.

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

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

-OrderId

The OrderIDs of the licenses to filter for. Wildcards are permitted. The License Order IDs to filter for.

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). Tab completion: Completes AmsNetId values from currently reachable routes on the local TwinCAT system. The net id.

Type: AmsNetId
Parameter Sets: NetIdPort
Aliases:

Required: True
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). Tab completion: Completes route names from currently reachable ADS systems on the local TwinCAT system. The input object.

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. Tab completion: Completes route names from currently reachable ADS systems on the local TwinCAT system. The address.

Type: String
Parameter Sets: AddressStr
Aliases:

Required: False
Position: 0
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). The port.

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. Tab completion: Completes IDs of active TwinCAT sessions (created with New-TcSession). The port.

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' License Status.

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. Force flag.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

OUTPUTS

NOTES