Administer licenses using the command line

You can administer all licensing categories in one of the following ways:

This chapter describes how to administer licenses using the command line. This can be useful in various cases. For instance, you can automate the administration of Execution Agents licenses with a simple batch file.

When you work with Execution Agents for which no license management graphical user interface (GUI) is installed, you can only use unattended license administration.

To administer licenses in unattended mode, follow the steps below:

  1. Open a command prompt and navigate to the file ToscaLicenseConfiguration.exe. By default, this file is located at %TRICENTIS_LICENSING_HOME%.

  2. Enter the following command: ToscaLicenseConfiguration <verb> <option>.

    • Replace <verb> with one of the available verbs.

    • Replace <option> with one of the available options, if needed.

    For instance, the command ToscaLicenseConfiguration view-licenses displays all available license packages.

To see a list of all options that you can use with a verb, type in the verb followed by --help.

This brings up a list of all options that you can use with this verb. For instance, running ToscaLicenseConfiguration connect-cloud --help results in the following help screen:

Description of available options

Available verbs

To see a list of all available verbs, run the command ToscaLicenseConfiguration help.

The following verbs are available:

Verb

Description

view-licenses

View all available licenses.

connect-cloud

Connect to your Cloud license server.

connect-on-premise

Connect to your on-premise Tricentis License Server.

checkout-licenses

Check out licenses.

return-checked-out

Return checked-out licenses.

switch-to-gui

Close the command prompt and switch to the license configuration GUI.

return-all-licenses

Remove all licenses from the machine.

By default, cloud and on-premise licenses are issued for a day. However, sometimes you only want to use them for a few hours to run your tests, and then return these licenses so that other machines can use them. In this case, it is important to return all licenses at the end of the test cycle with the return-all-licenses verb.

Examples

The examples below show how these license administration tasks work in the command line interface.

Connect to your Cloud License Server

The command below performs the following actions:

  • Connects to the Cloud server with the ID G4Y21CZK8SJF

  • Logs in with the user john@doe.com and the password ToscaRocks9

ToscaLicenseConfiguration connect-cloud -u john@doe.com -p ToscaRocks9 -i G4Y21CZK8SJF

Connect to your on-premise license server

The command below connects to the on-premise license server with the address licsrv. To do so, it uses port 7070.

ToscaLicenseConfiguration connect-on-premise -a licsrv -o 7070

Check out and return licenses

The command below checks out the following licenses for the duration of two days:

  • DotNetEngine

  • HTMLEngine

  • ToscaCommander

ToscaLicenseConfiguration checkout-licenses -e 2 HTMLEngine DotNetEngine ToscaCommander

You can return these licenses with the following command:

ToscaLicenseConfiguration return-checked-out