Summary of flexnetlsadmin Commands

The following describes the command options and associated arguments used by the FlexNet License Server Administrator command-line tool.

Usage

The following shows general command usage for the license server administrator and an enterprise user.

For a License Server Administrator

The following is command usage for a license server administrator performing general administrative tasks:

flexnetlsadmin -server licenseServer_baseURL [-authorize adminName {adminPassword|
-passwordConsoleInput}] -command_option [command_option_arguments] [-command_option...] 

The following is the command usage for a license server administrator managing user accounts when administrative security is enabled:

flexnetlsadmin -server licenseServer_baseURL -authorize adminName {adminPassword|
-passwordConsoleInput} -users [-create|edit|delete] 

For an Enterprise User

The command usage for an enterprise user is the following:

flexnetlsadmin -server licenseServer_baseURL [-authorize userName {userPassword|
-passwordConsoleInput}] -command_option [command_option_arguments] [-command_option...]

Additional Information

For additional assistance, see the following:

For the license server’s base URL (licenseServer_baseURL) required for each command, see License Server URL Designation.
If administrative security is enabled on the license server, you are required to provide authorization credentials to perform certain flexnetlsadmin operations. For more information about providing these credentials, see Use Credentials to Access Operations.

Command Summary

The following table summarizes flexnetlsadmin command options and arguments.

FlexNet License Server Administrator Command-line Tool Options

Option

Arguments

Description

-help

(no argument)

Lists the syntax of all flexnetlsadmin commands.

-server

(no argument)

Sets the license server base URL required in every command as the first option. For a local license server, use the following URL:

flexnetlsadmin.bat -server http://licenseServerURL/api/1.0/instances/instanceID 

For a CLS instance, use the URL that the producer provides, similar to this:

https://siteID.compliance.
flexnetoperations.com/api/1.0/instances/
instanceId 

Alternatively, set this value as the environment user variable FLEXNETLS_BASEURL on your machine so that you no longer have to include this option in the commands. See License Server URL Designation for more information.

Note:Use of the HTTPS protocol on the local license is strongly recommended when administrative security is enabled on the license server.

-authorize adminName {adminPassword |
-passwordConsoleInput}

 

The -authorize command option and its related options and arguments are in effect only when administrative security is enabled on the license server. Position the -authorize option after the ‑server option and before any other options. Administrators can choose to enter their password directly in the command or, for security reasons, use the -passwordConsoleInput option, which then issues a prompt to enter the password as console input. The remaining options and arguments for ‑authorize are described next. See Using the Command-line Tool to Manage Administrative Security for details.

Note:(Linux only) If you supply a password directly on the command line you may need to escape some characters with a backslash in order to prevent the shell from interpreting them. The safest approach is to surround the whole password with single quotes, and backslash any single quote that is part of the password.

[-users]

Shows all current user accounts on the license server.

[-users -create userName {userPassword|
‑passwordConsoleInput} [roles]]

Creates a new user account:

The userName and userPassword must meet the criteria specified in Credential Requirements.
To avoid exposing the password as a command-line argument, you can use the -passwordConsoleInput option, which then issues a prompt to enter the password as console input.
Roles are optional. If no role is specified, ROLE_READ is assigned by default. Valid roles include ROLE_READ, ROLE_RESERVATIONS, ROLE_ADMIN, ROLE_DROP_CLIENT, and ROLE_PRODUCER. Multiple roles can be combined using a plus sign (+) without any spaces in between (for example, ROLE_READ+ROLE_RESERVATIONS). See User Roles Defining Administrative Privileges for details.

Note:(Linux only) If you supply a password directly on the command line you may need to escape some characters with a backslash in order to prevent the shell from interpreting them. The safest approach is to surround the whole password with single quotes, and backslash any single quote that is part of the password.

 

[-users -edit userName {password|newPassword|
‑passwordConsoleInput} [newRoles]]

Updates the password or role or both for the user account identified by userName.

The password is not optional. Enter either the user’s current password or, if changing the password, the new password (which must meet the criteria listed in Credential Requirements).
To avoid exposing the password as a command-line argument, you can use the -passwordConsoleInput option, which then issues a prompt to enter the password as console input.
Assignment of new roles is optional. If one or more new roles are specified, they replace all current roles. If no roles are specified, the user’s current role assignment remains in effect. For information about roles, see User Roles Defining Administrative Privileges.

Note:(Linux only) If you supply a password directly on the command line you may need to escape some characters with a backslash in order to prevent the shell from interpreting them. The safest approach is to surround the whole password with single quotes, and backslash any single quote that is part of the password.

[-users -delete userName]

Deletes the user account specified by userName

[any options listed below]

Authorizes your access, as needed, to operations specified by any of the options listed below.

-authorize userName {userPassword|
-passwordConsoleInput}

[specific options listed below]

Authorizes an enterprise user’s access to the specific operations to which that user has privileges. Users can choose to enter their password (as defined for their account) directly in the command or, for security reasons, use the ‑passwordConsoleInput option, which then issues a prompt to enter the password as console input.

Note:(Linux only) If you supply a password directly on the command line you may need to escape some characters with a backslash in order to prevent the shell from interpreting them. The safest approach is to surround the whole password with single quotes, and backslash any single quote that is part of the password.

-status

[-suspend | -resume]

Shows information about the license server, including its status (as active, inactive, or suspended), its build and version, the back‑office URL, and other information.

The -suspend option temporarily suspends the license server (that is, the license server is still running but does not accept capability requests from client devices).

The -resume option ends the license server’s suspended state so that the server can proceed with normal operations.

-hostid

(no argument)

Displays the license server’s hostid value used to fulfill capability requests against a back-office server. If the server has multiple hostid values, the list contains the available hardware Ethernet addresses and dongle IDs. If virtual hosts are supported, the VM UUID will also be listed.

-selected

Returns the current “selected” hostid—that is, the hostid currently used by the license server.

-setactive hostIdValue hostIdType

Designates a new “selected” hostid. The new hostid must be one of the hostids returned by the -hostid command.

-activate

-id activation-id [-count value]

Activates licenses on the server by installing the specified number of copies of license rights (identified by the activation ID) from the back office. You can specify the ‑activate option multiple times to activate license rights from different activation IDs.

-activate -id activation_id
-count value -O filename 

(Part 1 of an offline activation) Generates a capability request containing the activation ID and saves the request as a binary file. To generate the request with multiple activation IDs, repeat the -activate option for each ID.

-load filename 

(Part 2 of an offline activation) Processes the offline capability-response binary file from the back office to install licenses on the license server.

-licenses

[-verbose]

Retrieves summary information or details (with -verbose) about current license distribution to client devices.

-features

(no argument)

Shows details about the features in the current license pool on the server.

-config

[-filter none | license-policy | sync | security | log | general | capability | failover]

Lists all license-server policy settings.

Use the -filter argument to list settings for only specific categories. The categories include:

none: All categories
license-policy: Policies for license distribution and usage
sync: Policies for synchronization with back office
security: The policy enabling administrative security on the license server
log: Logging parameters
general: Attributes identifying the license server
capability: Policies for polling the back-office for license updates
failover: License server failover

You can specify multiple categories for the -filter option. For example, flexnatlsadmin -config -filter sync log shows synchronization and logging settings. (Use -config or -config -filter none to list all settings.)

Those settings that you can edit are listed with an asterisk.

 

-set settingName=settingValue,
settingName=settingValue...

Overwrites the current value for the specified policy setting. You can provide multiple value pairs separated by commas. For additional syntax formats, see Override Policy Settings.

Note:To determine which settings are editable, use “‑config” to list the settings; editable settings are marked with an asterisk. Additionally, when you use “-o” to write settings to a file, only editable settings are written. Another way to apply edits to multiple settings is to use “-filter category ‑o <filename>” to write the editable settings to file, edit the settings as needed, and then use “‑load <filename>” to apply the edits.

-reset settingName,settingName...

Resets one or more policy settings back to their original default values set by the producer. Separate multiple setting names by commas. For additional syntax formats, see Override Policy Settings.

-o filename 

Writes the current, editable policy settings (except those is the general category) to the specified file in JSON format. This argument can be used with the -filter none option to write all editable settings to file or with the ‑filter category option (except for the general category) to limit the scope of editable settings written to the file.

-load filename 

Applies the edits to policy settings from the specified file to the existing policy settings. The contents of the file you are loading must be in JSON format.

In a typical scenario, first run -filter category -o filename to write current editable settings to a file, edit the values as needed, and then apply the edits using the ‑load filename option.

-model

(no argument)

Displays the model definition that is currently active, showing the partitions and rules.

-load filename 

Uploads the model definition to the license server. The contents of the file you are loading must be written according to the grammar in Model Definition Grammar and Syntax—EBNF.

Only one model definition can be active for each license server instance. You cannot upload a model definition with the name reservations or default, because these names are reserved.

Important:If you were previously using reservations, you must delete all reservation groups. Otherwise, uploading a model definition will fail.

-delete 

Deletes the model definition that is currently applied to the license server. The default model definition is automatically applied to the license server.

-partitions

(no argument)

Displays all partitions for the license server. The output lists information about every feature and every feature slice in each partition (feature slices are portions of feature counts allocated to a partition).

-reservations

[-group group_id] [-o filename]

Provides a summary of the reservation groups, including each group’s ID, currently available to the license server.

The -group group_id option shows details—at the reservation (hostid) and reservation-entry (feature) levels—for the specified reservation group.

The -o filename option writes the reservation information in JSON format (for all groups or for the specified group ID) to a file.

-genjson filename

Generates a template file for reservations in JSON format.

 

-load filename 

Creates a reservation group and its reservation entries via a file containing the reservation definitions in JSON format.

Note:To make changes to a reservation group, delete the group and recreate it with the changes to the reservation definitions.

Important:If you were previously using partitions, you must delete the active model definition before creating reservations.

-delete -group group_id 

Deletes the entire reservation group with all its reservations and reservation entries.

 

-delete -group group_id  
-reservation reservation_id 

Deletes the specified reservation within the specified reservation group.

-uploadPublicKey clientPublicKeyFileName

(no argument)

Uploads a file containing a client-side RSA public key (2048-bit DER-encoded) in octet-stream format to the license server. The producer will provide details about obtaining and uploading this key should such a key be required. License-server administrator credentials are required to use this option.

-binding

(no argument)

Shows both the current policy for a binding-break detection facility (enabled by the producer) and the current binding status as detected by this facility (ok, hard break, or soft break). If this facility is not enabled, the output indicates as such.

-version

(no argument)

Shows the version and build information for the FlexNet License Server Administrator command-line tool.

-json

(no argument)

Displays output in JSON format instead of the default table layout.

Note:You can query the JSON output of flexnetlsadmin with an external tool like jq. For information about jq, see https://stedolan.github.io/jq/manual/v1.6/.