---
schema_version: "1"
id: 9a6bd18803b9d5c167ae1f373cc916ec7bb6461a1f0e8cbd555c9d4a377a2b1b
title: tsm licenses
collection: tableau
version: current
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/current/zh-cn/server-linux/cli_licenses_tsm.md
canonical_url: https://help.tableau.com/current/server-linux/zh-cn/cli_licenses_tsm.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 3c597f8a5ad14edf3ab0bb1e6eeef80b28a7dc829ca75edaffc136ae6b118c03
description: Reference for tsm licenses commands to activate, deactivate, and manage Tableau Server product keys.
---
[跳转到主要内容](#main-content)

# tsm licenses

您可以使用 `tsm licenses` 命令管理服务器许可证任务，例如联机或脱机激活或停用 Tableau Server 产品密钥，以及获取关联文件以进行脱机激活或停用。

- [tsm licenses activate](#TSMActivate)
- [tsm licenses atr-configuration get](#TSMAtr-configuration-get)
- [tsm licenses atr-configuration set](#TSMAtr-configuration-set)
- [tsm licenses deactivate](#TSMDeactivate)
- [tsm licenses get-offline-activation-file](#TSMActivateFile)
- [tsm licenses get-offline-deactivation-file](#TSMDeactivateFile)
- [tsm licenses list](#TSMLicenseList)
- [tsm licenses refresh](#TSMLicenseRefresh)

## tsm licenses activate

激活 Tableau Server 产品密钥。

### 概要

`tsm licenses activate --license-key <product-key> [global options]`

### 选项

\-f, --license-file <file.tlf>

必需（如果要进行脱机激活）。

指定用于脱机激活的许可证文件 (<file>.tlf)。

\-k, --license-key <product-key>

必需（如果要激活有效产品密钥）。

指定用于联机激活的产品密钥。

\-t, --trial

**注意**：此选项仅在 2023.3.0 之前的版本中可用。如需更高版本的试用许可，请与您的客户代表联系。

必需（如果要激活试用许可证）。

激活试用许可证。

## tsm licenses atr-configuration get

查看服务器身份验证到运行 (ATR) 持续时间。ATR 持续时间是 Tableau Server 在必须续订许可证之前授权运行的时间长度。

### 概要

`tsm licenses atr-configuration get --duration [global options]`

### 选项

\--duration

显示当前身份验证到运行 (ATR) 持续时间（以秒为单位）。例如，432000（5 天）。

## tsm licenses atr-configuration set

设置服务器身份验证到运行 (ATR) 持续时间。ATR 持续时间是 Tableau Server 在必须续订许可证之前授权运行的时间长度。

### 概要

`tsm licenses atr-configuration set --duration <duration_in_seconds> [global options]`

### 选项

\--duration <以秒为单位的持续时间>

设置授权到运行 (ATR) 持续时间（以秒为单位）。例如，432000（5 天）。

## tsm licenses deactivate

联机或脱机停用 Tableau Server 产品密钥。

### 概要

`tsm licenses deactivate --license-key <product-key> [global options]`

### 选项

\-f, --license-file <return\_file.tlr>

必需（如果要进行脱机停用）。

指定用于脱机停用的许可证文件 (<file>.tlf)。

\-k, --license-key <product-key>

必需（如果要停用产品密钥）。

指定用于联机停用的产品密钥。

## tsm licenses get-offline-activation-file

生成脱机激活文件以用于脱机激活 Tableau Server。若要了解详细信息，请参见[脱机激活 Tableau Server](https://help.tableau.com/current/server-linux/zh-cn/activate_off.htm)。

**注意：**除非您使用的是服务器 ATR，否则一次只能激活一个产品密钥。使用服务器 ATR，您可以在脱机激活文件中提供逗号分隔的产品密钥列表，以同时激活多个产品密钥。

### 概要

`tsm licenses get-offline-activation-file --license-key <product-key> --output-dir <path> [global options]`

### 选项

\-k, --license-key <product-key>

必需。

指定用于脱机激活的产品密钥。

\-o, --output-dir <path>

必需。

应在其中保存脱机激活文件的位置。此位置必须存在。

## tsm licenses get-offline-deactivation-file

生成脱机停用文件以用于脱机停用 Tableau Server。若要了解详细信息，请参见[脱机停用 Tableau Server](https://help.tableau.com/current/server-linux/zh-cn/deactivate_off.htm)。

### 概要

`tsm licenses get-offline-deactivation-file --license-key <product-key> --output-dir <path> [global options]`

### 选项

\-k, --license-key <product-key>

必需。

指定用于脱机停用的产品密钥。

\-o, --output-dir <path>

必需。

应在其中保存脱机停用文件的现有位置。

## tsm licenses list

列出在 Tableau Server 部署中激活的许可证。

例如，具有五个 Creator 许可证、五个 Explorer 许可证、100 个 Viewer （查看者）许可证和 Data Management 的服务器将提供类似于如下的命令输出：

![四个 Tableau 许可证的列表及其到期日期的详细信息。](/tableau/current/zh-cn/server-linux/zh-cn/Img/license_list.png)

返回以下字段：

- **KEY**：用于标识许可证的全局唯一 16 字符字符串。
- **TYPE**：描述许可证的类型
    - Term：短期许可证映射到订阅计划，并且必须续订。到期日期列在“LIC EXP”字段下。
    - Perpetual：永久许可证只购买一次，无需续订，但必须刷新以更新 MAINT EXP 或维护到期日期。
    - Cores：内核许可证是映射到运行特定 Tableau Server 服务的计算机上的内核数的许可证。内核许可允许来宾用户访问服务器上或嵌入在其他 Web 服务器上的视图。内核许可证还允许无限制的 Explorer 和 Viewer（查看者）用户。
- **CREATOR**：针对 Tableau Server 部署发放的 Creator 许可证数。
- **EXPLORER**：针对 Tableau Server 部署发放的 Explorer 许可证数。
- **VIEWER**：针对 Tableau Server 部署发放的 Viewer（查看者）许可证数。
- **DATA MANAGEMENT**：Tableau Server 已获得 Data Management 许可 (`True`/`False`)。请参见[关于 Data Management](https://help.tableau.com/current/server-linux/zh-cn/dm_overview.htm)。
- **GUEST ACCESS**：已针对来宾用户授予 Tableau Server 许可。请参见[来宾用户](https://help.tableau.com/current/server-linux/zh-cn/users_guest.htm)。 利用来宾用户的能力需要内核许可。请参见“TYPE”字段。
- **LIC EXP**：许可证过期和 Tableau Server 将停止工作的日期。短期许可证过期。请参见“TYPE”字段。访问 Tableau [客户门户](https://customer.tableausoftware.com/)以刷新许可证。
- **MAINT EXP**：仅适用于旧版永久许可证（TYPE = Perpetual）。对于短期许可证，此字段将输出 `N/A`。MAINT EXP 显示 Tableau Server 部署维护合同的到期日期。若要更新许可证管理密钥，请参见[刷新产品密钥的过期日期和属性](https://help.tableau.com/current/server-linux/zh-cn/license_refresh.htm)。访问 Tableau [客户门户](https://customer.tableausoftware.com/)以查看维护购买历史记录并购买附加维护。
- **可更新：**指定许可证是否为可更新的订阅许可证 (`True`/`False`)。
- **LBLM**：指定是否为 Tableau Server 部署启用了基于登录名的许可证管理 (LBLM) (`True`/`False`)。启用后，LBLM 允许用户登录到 Tableau Server 以许可其 Tableau Desktop 或 Prep 实例，而不是输入产品密钥。有关 LBLM 的详细信息，请参见[基于登录名的许可证管理](https://help.tableau.com/current/server-linux/zh-cn/license_lblm.htm)。
- **SERVER MANAGEMENT**：已针对 Advanced Management（前身为服务器管理加载项）授予 Tableau Server 许可 (`True`/`False`)。有关 Advanced Management 的详细信息，请参见[关于 Tableau Server 上的 Tableau Advanced Management](https://help.tableau.com/current/server-linux/zh-cn/itm_intro.htm)。

### 概要

`tsm licenses list [global options]`

## tsm licenses refresh

更新 Tableau Server 上所有产品密钥的维护到期日期。

### 概要

`tsm licenses refresh [global options]`

## 全局选项

\-h, --help

可选。

显示命令帮助。

\-p, --password <password>

在会话不是活动状态的情况下为必需，`-u` 或 `--username` 也为必需。

为在 `-u` 或 `--username` 中指定的用户指定密码。

如果密码包括空格或特殊字符，请将其括在引号中：

`--password 'my password'`

\-s, --server https://<hostname>:8850

可选。

对 Tableau 服务管理器使用指定的地址。URL 必须以 `https` 开头，包括端口 8850，并使用服务器名称（而不是 IP 地址）。例如，`https://<tsm_hostname>:8850`。如果没有指定服务器，则假定为 `https://<localhost | dnsname>:8850`。

\--trust-admin-controller-cert

可选。

使用此标志来信任 TSM 控制器上的自签名证书。有关证书信任和 CLI 连接的详细信息，请参见 [连接 TSM 客户端](https://help.tableau.com/current/server-linux/zh-cn/tsm_overview.htm#Connecti)。

\-u, --username <user>

在会话不是活动状态的情况下为必需，`-p` 或 `--password` 也为必需。

指定用户帐户。如果未包括此选项，则使用您登录所使用的凭据运行该命令。