---
schema_version: "1"
id: 3cadc390303038e5281fafef507dc8bd6b6555fb15cbec907a8b1ec4c1c9e665
title: 重新整理或停用您的產品金鑰
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/desktopdeploy/desktop_deploy_cli_refresh_key.md
canonical_url: https://help.tableau.com/current/desktopdeploy/zh-tw/desktop_deploy_cli_refresh_key.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 4ef48ac35957e75bd8b251c2f322e58d49e8494d202da60e4f0b76b39fe9cdee
description: Refresh or deactivate Tableau Desktop and Prep Builder product keys from the command line.
---
[跳至主要內容](#main-content)

# 重新整理或停用您的產品金鑰

購買新訂閱時，必須重新整理產品金鑰。若要將 Tableau 產品移動至另一台電腦，或需要將其從電腦中移除，則需要停用產品金鑰。

有關 Tableau Prep 中支援的所有命令列選項的清單，請參閱 [Tableau Prep 命令列參考](https://help.tableau.com/current/prep/zh-tw/prep_command_line_reference.htm)。

**附註：**若使用 以登入為基礎的授權管理 或授權執行 (ATR) 服務來管理 Tableau Desktop 授權，則無需使用這些命令來重新整理或停用 Tableau。有關以登入為基礎的授權管理 的詳情，請參閱[授權 lblm.htm](https://help.tableau.com/current/server/zh-tw/license_lblm.htm "登入型授權管理")。有關 ATR 服務的詳情，請參閱[設定虛擬桌面支援](https://help.tableau.com/current/desktopdeploy/zh-tw/desktop_deploy_license_deactivate.htm)。

## 重新整理產品金鑰

若您有舊產品金鑰，則在購買新訂閱時，必須重新整理您的產品金鑰。重新整理會更新產品金鑰的日期並顯示新的到期日。

如果在到期日期發生之前重新整理訂用服務(期限)產品金鑰，則產品金鑰不會變更，但到期日期將會變更。產品金鑰將在到期日已屆或不久之後變更。如果訂用服務（期限）產品金鑰未重新整理且已過期，Tableau 將停止工作，而且您必須在 Tableau 客戶入口網站啟用新的產品金鑰。

另一方面，如果產品金鑰是永久的（舊版），並且其維護已過期，Tableau 將繼續運作，但在續訂維護之前，您將無法存取升級。續訂維護後，請重新整理現有產品金鑰以更新其維護到期日期。產品金鑰永遠不會更改。

**附註：**如果 Tableau Desktop 處於離線狀態，您就無法重新整理產品金鑰。如果在離線模式下啟用 Tableau Desktop，您必須從 Tableau 客戶入口網站取得並啟用新的金鑰。

若要使用命令列重新整理 Tableau 產品金鑰，請使用 `-refresh` 選項。

如果要使用自動化指令碼重新整理 Tableau Server，請參閱 Tableau Server 說明中的[自動執行授權工作](https://help.tableau.com/current/server/zh-tw/license_automating.htm)。

### Windows

使用 `-refresh` 選項和產品金鑰執行 `tableau.exe`。例如：

`start/wait " "C:\Program Files\Tableau\Tableau <version>\bin\tableau.exe" -refresh`

### Mac

在 `/Applications` 路徑中對 Tableau 物件執行 `-refresh` 選項：

`./Applications/Tableau.app/Contents/MacOS/Tableau -refresh`

## 使用零停機授權自動重新整理產品金鑰

從 Tableau 版本 2021.1 開始，已連線到網際網路的 Tableau Desktop 和 Tableau Prep Builder 使用者不再需要手動重新整理產品金鑰。如果使用者已登入 Tableau Desktop 或 Tableau Prep Builder，則從訂閱到期前 14 天開始，無需任何動作即可自動重新整理短期授權。永久產品密鑰不會自動重新整理，必須使用管理產品金鑰功能表選項手動重新整理。

Tableau Desktop 和 Tableau Prep Builder 會嘗試以無訊息方式重新整理使用中產品金鑰，並且若以無訊息方式重新整理失敗，則會在其授權設定為過期前 14 天警告使用者。Tableau 會嘗試三次重新整理產品金鑰（在授權到期前的 14day，14 天和 1 天），以反映因訂閱續訂而延長的授權結束日期。產品金鑰不會重新整理，除非 Tableau Desktop 使用者在那些時候登入 Tableau Desktop。對於未每日登入 Tableau Desktop 的使用者，必須使用管理產品金鑰功能表選項重新整理其產品金鑰。

## 停用產品金鑰

> [!TIP]
> 
> **附注**：如果要使用自動化指令碼停用 Tableau Server，請參閱 Tableau Server 說明中的[自動執行授權工作](https://help.tableau.com/current/server/zh-tw/license_automating.htm)。

若要將 Tableau Desktop 或 Tableau Prep Builder 轉移到另一台電腦，或者需要將其從電腦中移除，您應停用產品金鑰。

若要擷取和停用 Tableau Desktop 或 Tableau Prep Builder 產品金鑰，而不必將其從單獨的電腦中手動移除，請從命令列啟動 Tableau 並使用 `-return` 選項。此選項採用一個參數，即產品金鑰。

若您使用執行授權 (ATR) 服務來管理 Tableau Desktop 授權，就不需要使用這些命令來重新整理或停用 Tableau。若要瞭解有關 ATR 服務的詳情，請參閱[設定虛擬桌面支援](https://help.tableau.com/current/desktopdeploy/zh-tw/desktop_deploy_license_deactivate.htm)。

還可以在解除安裝期間中停用產品金鑰（僅適用於 Windows 版 Desktop）。有關詳情，請參閱[在解除安裝期間中停用產品金鑰（僅適用於 Windows 版 Desktop）](#deactivate_uninstall)。

### Windows

使用 `-return` 選項和產品金鑰執行 tableau.exe，如以下範例中所示：

`start/wait " "C:\Program Files\Tableau\Tableau <version>\bin\tableau.exe" -return <product_key>`

或

`start/wait " "C:\Program Files\Tableau\Tableau Prep Builder <version>\Tableau Prep Builder.exe" -return <product_key>`

### Mac

在 `/Applications` 路徑中對 Tableau 物件執行 `-return` 選項：

`./Applications/Tableau.app/Contents/MacOS/Tableau -return <product_key>`

或

`"./Applications/Tableau Prep Builder <version>.app/Contents/MacOS/Tableau Prep Builder" -return <product_key>`

### 在解除安裝期間中停用產品金鑰（僅適用於 Windows 版 Desktop）

使用 `RECLAIMLICENSE=1` 安裝程式選項在 Windows 上解除安裝 Tableau Desktop 時，可以從命令列停用任何永久（或版本 2018.3 及更高版本中的訂閱）產品金鑰。

例如：

`tableauDesktop-64bit-2025-3-1.exe /uninstall /quiet /norestart ACCEPTEULA=1 RECLAIMLICENSE=1`

回收授權時，會取消 Tableau Desktop 的授權，並將啟用授權傳回到關聯的產品金鑰，以供將來使用。Tableau.exe 會在卸載開始時執行 `-return` 命令以停用任何有效的永久或短期產品金鑰。